Property in LogEvent should not be overridden by scope#272
Property in LogEvent should not be overridden by scope#272huoshan12345 wants to merge 4 commits into
Conversation
|
Thanks for sending this. Because the method is called for every log statement, I'm not sure the added cost of creating, populating, and iterating through an additional |
Thanks for reviewing the PR! |
|
Sorry! The PR I meant to refer to is #269. |
…ons-logging into bugfix/property-in-logevent-should-not-be-overridden-by-scope # Conflicts: # src/Serilog.Extensions.Logging/Extensions/Logging/SerilogLoggerProvider.cs # test/Serilog.Extensions.Logging.Tests/SerilogLoggerTests.cs
fixes #271
NOTE:
ExternalScopeProvider.ForEachScopeprocesses scopes from outer to inner, which is the opposite of Serilog's scope traversal order. This fix implementsForEachScopeReversedand passesupdate: falseto the methodEnrichWithStateAndCreateScopeItemto ensure consistent behavior matching Serilog's expectations.