-
Notifications
You must be signed in to change notification settings - Fork 25.3k
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
AddAzureWebAppDiagnostics Logging Provider not honoring filters #15212
Comments
Hi, I found the same issue. |
@Tratcher should you transfer this to https://github.com/aspnet/AspNetCore/issues ? |
Looks like a duplicate of dotnet/aspnetcore#3279 |
@guardrex see Diagnostic Logs Level is only used for Log streaming output. It doesn't apply to any other logging providers. Can you add that to this doc? |
Sure thing. |
@Rick-Anderson thanks for the reply and the link. Unfortunately it solves the problem for whoever cannot get the app to log, but not for me (and I think @fvilches17) cause we need to filter what's being already logged. Any hint on how to achieve that? Thanks again, |
Fixed by #15772. |
E.g.
Set appsettings.json like so:
"Logging": {
"LogLevel": {
"MyNamespace.*": "Debug",
"Default": "Error"
}
}
Run web app locally and see only you own logs printed to the console.
Add AddAzureWebAppDiagnostics to logging in program.cs
Deploy your asp.net core app (in my case I tried 2.2 and 3.0)
Enable logs in AppService logs for your web app in azure portal. Log level = Information
Watch logs come in. You notice ALL logs (e.g. Microsoft.*) come in.
You can also refer here
https://stackoverflow.com/questions/42789154/filtering-logs-in-azure-web-app-diagnostics-logs
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: