Skip to content

fix duplication of shardId in logs#746

Merged
olegrok merged 1 commit intomainfrom
fix-dup-log-shardId
Apr 3, 2025
Merged

fix duplication of shardId in logs#746
olegrok merged 1 commit intomainfrom
fix-dup-log-shardId

Conversation

@olegrok
Copy link
Copy Markdown
Contributor

@olegrok olegrok commented Apr 3, 2025

Zerolog doesn't deduplicate log entry tags. So it's enough to set shardId for root logger. Otherwise we will have shardId twice in JSON. This patch removes several FieldShardId fields in case if it's defined in the root logger.

Zerolog doesn't deduplicate log entry tags. So it's enough to set shardId
for root logger. Otherwise we will have shardId twice in JSON.
This patch removes several FieldShardId fields in case if it's defined
in the root logger.
@Un1oR
Copy link
Copy Markdown
Contributor

Un1oR commented Apr 3, 2025

If we don't use zerolog directly now, why not make under if assert.Enable a check for already set fields?

@olegrok olegrok added this pull request to the merge queue Apr 3, 2025
@olegrok
Copy link
Copy Markdown
Contributor Author

olegrok commented Apr 3, 2025

If we don't use zerolog directly now, why not make under if assert.Enable a check for already set fields?

I'll think about it

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 3, 2025
@olegrok olegrok added this pull request to the merge queue Apr 3, 2025
Merged via the queue into main with commit 72caed9 Apr 3, 2025
15 checks passed
@olegrok olegrok deleted the fix-dup-log-shardId branch April 3, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants