Skip to content

How to reconfigure after AppSettings.json reloaded? #46

@ahdung

Description

@ahdung

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions