Skip to content

Using LoggingLevelSwitch in order to dynamically change the serilog level

Notifications You must be signed in to change notification settings

aimenux/SerilogLoggingLevelSwitchDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.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

About

Using LoggingLevelSwitch in order to dynamically change the serilog level

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages