Answers for "c# serviceCollection AddLogging"

C#
1

c# serviceCollection AddLogging

public void ConfigureServices(IServiceCollection services)
{
    services.AddLogging(logging => 
    {
        logging.AddConfiguration(hostingContext.Configuration.GetSection("Logging"));
        logging.AddConsole();
        logging.AddDebug();
        logging.AddAzureWebAppDiagnostics();
    }
}
Posted by: Guest on November-17-2021

C# Answers by Framework

Browse Popular Code Answers by Language