0

I wish to hide logs from 'System.Runtime' & 'Microsoft.AspNetCore.Hosting' in Azure application insights. This is the serilog logging configuration I have in yml file.

Serilog:
  MinimumLevel:
    Default: Information
    Override:
      Microsoft: 6
      System: 6

But I could still see the logs in application insights. If in microsoft equivalent logging configuration, this will be the configuration below:

"Logging":{
  "ApplicationInsights": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "None",
      "System": "None",
  }
}

Did I get the equivalent Serilog logging configuration wrong here?

1 Answer 1

1

There is no such log level as "None", try the following config

"Logging": {
    "LogLevel": {
      "Default": "Information",
      "System.Runtime": "Error"
      "Microsoft.AspNetCore": "Error"
    }
  }

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

Hi @roman-marusyk, If put Error, wouldn't all error and critical logs will output to appinsights?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.