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

[Bug] The order of LogLevel is incorrect in TokenAcquisition.cs #1250

Closed
1 of 8 tasks
caseyzhang123 opened this issue Jun 9, 2021 · 2 comments · Fixed by #1251
Closed
1 of 8 tasks

[Bug] The order of LogLevel is incorrect in TokenAcquisition.cs #1250

caseyzhang123 opened this issue Jun 9, 2021 · 2 comments · Fixed by #1251
Labels
bug Something isn't working fixed P1
Milestone

Comments

@caseyzhang123
Copy link

Which version of Microsoft Identity Web are you using?
Note that to get help, you need to run the latest version.
Microsoft.Identity.Web 1.11

Where is the issue?

  • Web app
    • Sign-in users
    • Sign-in users and call web APIs
  • Web API
    • Protected web APIs (validating tokens)
    • Protected web APIs (validating scopes)
    • Protected web APIs call downstream web APIs
  • Token cache serialization
    • In-memory caches
    • Session caches
    • Distributed caches
  • Other (please describe)

Is this a new or an existing app?
b. The app is in production and I haven't upgraded Microsoft Identity Web, but started seeing this issue.

Expected behavior
When we set LogLevel to Debug or Trace in our appsettings, we expect verbose logs from Microsoft.Identity.Client.

Actual behavior
Instead, we only get Info logs from Microsoft.Identity.Client

Possible solution
In ConvertMicrosoftExtensionsLogLevelToMsal in TokenAcquisition.cs, reverse the order of the checks for IsEnabled(LogLevel.Information) and IsEnabled(LogLevel.Debug) || IsEnabled(LogLevel.Trace)

@jmprieur jmprieur added bug Something isn't working P1 labels Jun 9, 2021
@jmprieur jmprieur added this to the 1.13.0 milestone Jun 9, 2021
@jennyf19 jennyf19 added the fixed label Jun 9, 2021
@jennyf19
Copy link
Collaborator

jennyf19 commented Jun 9, 2021

fixed. thanks @caseyzhang123

@jmprieur jmprieur linked a pull request Jun 9, 2021 that will close this issue
@jennyf19
Copy link
Collaborator

Fixed in 1.13 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed P1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants