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

[AuthZ] Switch to debug logging to cut down on noise #29137

Merged
4 commits merged into from
Jan 8, 2021
Merged

Conversation

HaoK
Copy link
Member

@HaoK HaoK commented Jan 7, 2021

For #28234

@ghost ghost added the area-auth Includes: Authn, Authz, OAuth, OIDC, Bearer label Jan 7, 2021
@HaoK HaoK changed the title Switch to debug to cut down on log noise [AuthZ] Switch to debug logging to cut down on noise Jan 7, 2021
@HaoK HaoK requested a review from Tratcher January 8, 2021 17:01
@HaoK HaoK marked this pull request as ready for review January 8, 2021 17:01
formatString: "Authorization was successful.");
_userAuthorizationFailed = LoggerMessage.Define<string>(
eventId: new EventId(2, "UserAuthorizationFailed"),
logLevel: LogLevel.Information,
logLevel: LogLevel.Debug,
formatString: "Authorization failed. {0}");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The failure scenario seems to be providing more data than they reported in the issue. Looks like that was a 5.0 change?

If the failure case is providing useful details now then we should keep that at the existing log level.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It depends on the code path really, but sure we can keep the failure as Information and the success as Debug, thoughts @blowdart ? There's potentially more information if requirements failed as opposed to explicit Fail being called

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Darn it. Ok yes, keep fail as informational then.

@HaoK HaoK added the auto-merge label Jan 8, 2021
@ghost
Copy link

ghost commented Jan 8, 2021

Hello @HaoK!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit b640028 into master Jan 8, 2021
@ghost ghost deleted the haok/authzlog branch January 8, 2021 18:59
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-auth Includes: Authn, Authz, OAuth, OIDC, Bearer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants