Skip to content

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

Closed

Description

@caseyzhang123

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)

Activity

  1. jennyf19 commented on Jun 9, 2021

    @jennyf19
    Collaborator

    fixed. thanks caseyzhang123

  2. linked a pull request that will close this issuefix logging #1251on Jun 9, 2021
  3. jennyf19 commented on Jun 11, 2021

    @jennyf19
    Collaborator

    Fixed in 1.13 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1bugSomething isn't workingfixed

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions