Aspnet: IncludeScopes for Providers

On a previous job I had this in my appsettings.json,   

  {

    "Logging": {

        "IncludeScopes": false,

        "LogLevel": {

          "Default": "Information",

          "Microsoft": "Warning",

          "Microsoft.AspNetCore": "Warning",

          "Microsoft.Hosting.Lifetime": "Trace"

        }

      }

    }


Getting a warning message, "logging configuration for provider. The provider name must match the configuration's json property name." This doesn't help me understand why its looking warning for an object. If it helps I'm using nlog but this warning still appears even if I remove nlog. After writing this I found the docs here: Logging in .NET Core and ASP.NET Core

And the following fixes my warning:

     "Logging": {

        "Console": {

          "IncludeScopes": false

        },

        "LogLevel": {

          "Default": "Information",

          "Microsoft": "Warning",

          "Microsoft.AspNetCore": "Warning",

          "Microsoft.Hosting.Lifetime": "Trace"

        }

      }

But is this what I want or should the level log be inside? After reading the documents I think I just want to remove it. Since I'm setting the levels and not adding Microsoft logs which is why I added it. I forget where I got this code original but its forced me to learn about it now.


Popular posts from this blog

Nginx Best Practices Extended

Installing Windows on Acer chromebook 15 cb3-532

Entity Framework: ToListAynsc & WhereAsync