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

AddAzureWebAppDiagnostics Logging Provider not honoring filters #15212

Closed
fvilches17 opened this issue Oct 19, 2019 — with docs.microsoft.com · 8 comments · Fixed by #15772
Closed

AddAzureWebAppDiagnostics Logging Provider not honoring filters #15212

fvilches17 opened this issue Oct 19, 2019 — with docs.microsoft.com · 8 comments · Fixed by #15772
Assignees
Labels
doc-bug Pri1 High priority, do before Pri2 and Pri3 Source - Docs.ms Docs Customer feedback via GitHub Issue

Comments

Copy link

E.g.

  1. Set appsettings.json like so:
    "Logging": {
    "LogLevel": {
    "MyNamespace.*": "Debug",
    "Default": "Error"
    }
    }

  2. Run web app locally and see only you own logs printed to the console.

  3. Add AddAzureWebAppDiagnostics to logging in program.cs

  4. Deploy your asp.net core app (in my case I tried 2.2 and 3.0)

  5. Enable logs in AppService logs for your web app in azure portal. Log level = Information

  6. 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.

@dotnet-bot dotnet-bot added ⌚ Not Triaged Source - Docs.ms Docs Customer feedback via GitHub Issue labels Oct 19, 2019
@Rick-Anderson Rick-Anderson added doc-bug Pri1 High priority, do before Pri2 and Pri3 and removed ⌚ Not Triaged labels Oct 19, 2019
@Rick-Anderson Rick-Anderson added this to the Backlog milestone Oct 19, 2019
@buttons019
Copy link

Hi, I found the same issue.
I'd like to know (sorry for my lack of experience) whether this is being treated as a bug or differently and when a solution is planned to be available. I had to suspend logging on an almost live app and need to reestablish it. Thanks,

@Rick-Anderson
Copy link
Contributor

Rick-Anderson commented Nov 19, 2019

@Tratcher should you transfer this to https://github.com/aspnet/AspNetCore/issues ?
I'd do it but I don't have write permission to your repo.
cc @guardrex

@Rick-Anderson
Copy link
Contributor

@fvilches17 @buttons019 see #14924

@Tratcher
Copy link
Member

Looks like a duplicate of dotnet/aspnetcore#3279

@Rick-Anderson
Copy link
Contributor

@guardrex see @pakrym answer

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?

@guardrex
Copy link
Collaborator

Sure thing.

@guardrex guardrex self-assigned this Nov 19, 2019
@guardrex guardrex added this to To do in November 2019 via automation Nov 19, 2019
@guardrex guardrex moved this from To do to Next up in November 2019 Nov 19, 2019
@guardrex guardrex modified the milestones: Backlog, 2019 Q4 ends Dec 31 Nov 19, 2019
@guardrex guardrex moved this from Next up to In progress in November 2019 Nov 19, 2019
@buttons019
Copy link

@fvilches17 @buttons019 see #14924

@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,

@guardrex
Copy link
Collaborator

Fixed by #15772.

November 2019 automation moved this from In progress to Done Nov 20, 2019
@dotnet dotnet locked and limited conversation to collaborators Dec 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
doc-bug Pri1 High priority, do before Pri2 and Pri3 Source - Docs.ms Docs Customer feedback via GitHub Issue
Projects
No open projects
November 2019
  
Done
Development

Successfully merging a pull request may close this issue.

6 participants