-
Notifications
You must be signed in to change notification settings - Fork 205
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
add LogLevel.None predicate to logging decision #2816
Conversation
@westin-m can you share a screenshot of the diff now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @westin-m
Please update the wiki on logging: https://github.com/AzureAD/microsoft-identity-web/wiki/Logging
src/Microsoft.Identity.Web.TokenAcquisition/MicrosoftIdentityBaseAuthenticationBuilder.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/MicrosoftIdentityBaseAuthenticationBuilder.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remember to add a section for the next changelog for this one...thx!
@jmprieur Done! |
If
Logging:LogLevel:Microsoft.Identity.Web
is assigned toNone
in appsettings.json, the default logger is not initialized and IdWeb does not record any logs.Before, leaving the log level at
Information
and trying to use the no-op NullIdentityModelLogger (this decision would be ignored and the default logger would be used anyway) yielded about 500 lines of logging when launching an app and making a single API call.Changing the log level to
None
still resulted in logs being recorded by the default logger, about 10 lines for the above scenario of a single API call.Now, choosing
None
means the default logger is not instantiated and IdWeb logs nothing.