It's my config file:
{
"Logging": {
"LogLevel": {
"Console": "Critical",
"Default": "Warning",
"System": "Warning",
"Microsoft": "Trace"
}
}
}
This code i use to load config file:
hostBuilder.ConfigureLogging ( ( context, builder ) =>
{
builder.AddConfiguration ( context.Configuration.GetSection ( "Logging" ) );
builder.AddConsole ( );
} );
But it set an Information log level for categories: System, Microsoft and a Debug for Default. Where did i make a mistake?
I found a mistake. There are two config files appsettings.json and appsettings.Development.json. And system use it in development mode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With