serilog-extensions-logging-file icon indicating copy to clipboard operation
serilog-extensions-logging-file copied to clipboard

How to reconfigure after AppSettings.json reloaded?

Open ahdung opened this issue 4 years ago • 0 comments

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);

ahdung avatar Jan 19 '21 07:01 ahdung