Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 968 Bytes

README.md

File metadata and controls

17 lines (13 loc) · 968 Bytes

.NET

SerilogLoggingLevelSwitchDemo

Using LoggingLevelSwitch in order to dynamically change the serilog level

In this demo, i m using a nice serilog feature LoggingLevelSwitch in order to change the serilog level in the fly.

✍️ This feature may be useful when we want to have more detailed logs in some places of our code based on some runtime behaviour (condition, exception, etc).

✍️ This feature can be used either when serilog is configured with fluent api or via json file section (set ConfigType to either Fluent or Json in appsettings.json).

SerilogLoggingLevelSwitchDemo

Tools : vs22, net 6.0, serilog