c# serviceCollection AddLogging

123

c# serviceCollection AddLogging -

public void ConfigureServices(IServiceCollection services)
{
    services.AddLogging(logging => 
    {
        logging.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
        logging.AddConsole();
        logging.AddDebug();
        logging.AddAzureWebAppDiagnostics();
    }
}

Comments

Submit
0 Comments