Skip to content

Missing trace\debug logs in ASP.NET Core 5?

Rolf Kristensen edited this page Jun 4, 2021 · 4 revisions

Missing the trace and debug logs in ASP.NET Core 5?

Check your appsettings.json

The following is advised:

{
  "Logging": {
    "LogLevel": {
      "Default": "Trace",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "AllowedHosts": "*"
}

⚠️ Make sure also to check any environment specific appsettings.json. Ex. appsettings.development.json