Answer the question
In order to leave comments, you need to log in
What is the correct way to set the inject level of an ILogger?
Hello everyone, the question is the following, there is an ILogger, its configuration is defined in the Program
using (var host = new WebHostBuilder()
// Код
.ConfigureLogging(ConfigureLogging)
// Код
static void ConfigureLogging(ILoggingBuilder builder)
{
builder.AddConsole();
}
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}
{
"Logging": {
"LogLevel": {
"Default": "Warning"
}
}
}
static void ConfigureLogging(ILoggingBuilder builder)
{
builder.AddConsole();
builder.SetMinimumLevel(LogLevel.Warning);
}
Answer the question
In order to leave comments, you need to log in
Here the www.pixijs.com library is used to write such an interaction with the username.
Apparently, your Environment is not Development, so it has not been redefined.
And you also have the logging level explicitly redefined for
Microsoft.Hosting.Lifetime in the base profile, so it will write them from the Information level
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question