Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# serviceCollection AddLogging

public void ConfigureServices(IServiceCollection services)
{
    services.AddLogging(logging => 
    {
        logging.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
        logging.AddConsole();
        logging.AddDebug();
        logging.AddAzureWebAppDiagnostics();
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #serviceCollection #AddLogging
ADD COMMENT
Topic
Name
1+1 =