Is there a property / method in Serilog where I could (programmatically) check the current configuration? (sinks, minimum level)
e.g. if have this config:
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Debug()
.WriteTo.File("log.txt")
.WriteTo.Console(restrictedToMinimumLevel: LogEventLevel.Information)
.CreateLogger();
How could I read this config later?
(In my case the config is dynamically created outside my application)
No, there's no reflective way to examine Serilog configuration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With