serilog-extensions-logging-file
serilog-extensions-logging-file copied to clipboard
How to reconfigure after AppSettings.json reloaded?
I use loggerFactory.AddFile(AppSettings.Configuration.GetSection("Logging:Serilog")); in Startup.Configure, when appsettings.json file changed, i want update the settings of serilog.
I use ChangeToken.OnChange for response the changing:
ChangeToken.OnChange(() => AppSettings.Configuration.GetReloadToken(), env_ =>
{
//how to reconfigure serilog?
}, env);