question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug - Preview version] IIdentityLogger does not log information created before serviceProvider is available

See original GitHub issue

Only LogLevel.Trace works to log the first line (header) of the Wilson logs. This is because, for all the other log levels, the logger instance is not created yet. The logger instance in ASP.NET Core version requires an IServiceProvider, which is created in Id. Web here, but the static instances in Wilson have already been initialized by ASP.NET Core, so the NullIdentityModelLogger is getting created, which sets IsEnabled to false. Logging gets enabled later, but the initial messages are not capture.

FYI: @sruke @brentschmaltz @jmprieur

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
srukecommented, May 9, 2022

Verbose logs displayed by the static ctors are noisy and can be removed. The header information can be used as a substitute for view the Identity version.

Feature request was created to prefix error message with assembly version info to aid troubleshooting - https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/1852

1reaction
srukecommented, May 9, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

netcore 2.0 not logging trace and debug when logging ...
I have a problem in that logging is working for Info/Warning/Error/Critical but Debug and Trace are not showing up. I have set the...
Read more >
Logging errors and exceptions in MSAL.NET
IIdentityLogger is the logging implementation used by MSAL.NET to produce logs for debugging or health check purposes. Logs are only sent if  ......
Read more >
changelog.md - AzureAD/microsoft-identity-web
Helps creating protected web apps and web APIs with Microsoft identity platform ... Fix bug found in usage of AzureAD key issuer validator,...
Read more >
How to get AppInsights working in .NET 7 Functions v4
This setup is ugly but solves AppInsights logging in Azure Functions v4 in combination with .NET 7. It uses the new (still in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found