Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would be possible to use LogLevel structure ? #39

Closed
JiriZidek opened this issue Feb 20, 2022 · 2 comments
Closed

Would be possible to use LogLevel structure ? #39

JiriZidek opened this issue Feb 20, 2022 · 2 comments
Labels

Comments

@JiriZidek
Copy link

It looks like appsettings.json parameter
"MinLevel": "Warning", // min level for the file logger
replaces normal

    "LogLevel": {
      "Default": "Information",
      "System": "Warning",
      "Microsoft": "Warning"
    }

Am I missing something ? Is tehre any plan to use the microsoftish way of configuring levels ?
Thanks for clarification. Jiri

@VitaliyMF
Copy link
Contributor

Am I missing something ? Is tehre any plan to use the microsoftish way of configuring levels ?

Message filtering rules are applied inside logging infrastructure (Microsoft.Extensions.Logging) and works for all logging providers in a same way.

However, you can specify min log level exactly for FileLoggingProvider (say, write to a file only "Warning" and "Error" entries).

@JiriZidek
Copy link
Author

So using "MinLevel": "Warning" is in fact very same like setting:
{
"File": {
"LogLevel": {
"Default": "Warning"
},
.....
}
OK, clear now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants