Closed 0xced closed 2 years ago
Thanks for the PR!
To me, it seems like the behavior in linked snippet (2) is a bug (None
shouldn't be used for log events, as you've quoted), but since this gets us closer to the behavior of the built-in logger I think it's a plus and we should merge 👍
Before this commit:
LogLevel.None
is converted toLogEventLevel.Fatal
and events with aNone
level are logged as fatal.After this commit:
LogLevel.None
is observed and logs and events with aNone
level are ignored.The
None
level is documented as such:Note: this erroneous behaviour was seen in a real-world scenario:
BuildOrgConnectUri CoreClass ()
is logged asTraceEventType.Start
TraceEventType.Start
is converted toLogLevel.None
LogLevel.None
is converted toLogEventLevel.Fatal
As a result,
BuildOrgConnectUri CoreClass ()
is logged as fatal whereas it should have been ignored.