Skip to content

Override EventId if set via state instead of throwing#65

Merged
KodrAus merged 1 commit into
datalust:devfrom
KodrAus:fix/event-id-override
Dec 20, 2024
Merged

Override EventId if set via state instead of throwing#65
KodrAus merged 1 commit into
datalust:devfrom
KodrAus:fix/event-id-override

Conversation

@KodrAus
Copy link
Copy Markdown
Member

@KodrAus KodrAus commented Dec 19, 2024

Closes #63

cc @john-surcombe I've opted to override rather than respect the existing event id on properties so that it ends up using the correct computed value. How does this look to you?

@john-surcombe
Copy link
Copy Markdown

Looks great - anything that doesn't throw an exception is fine for me. I just hit this when switching on debug logging for AspNetCore. Something in the framework logs something with an EventId in the state, which then triggers this exception and borks the stack.

@KodrAus KodrAus merged commit 75a871b into datalust:dev Dec 20, 2024
@nblumhardt nblumhardt mentioned this pull request Oct 9, 2025
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.

Serilog.Extensions.Logging.SerilogLogger throws exception if state parameter contains key 'EventId'

2 participants