Skip to content

Updated from 2.5.0 to 2.6.0 broke my project. #91

@VictorioBerra

Description

@VictorioBerra

Asp.Net Core

Error: System.InvalidOperationException: 'No LoggingLevelSwitch has been declared with name "Debug". You might be missing a section "LevelSwitches":{"Debug":"InitialLevel"}'

.UseSerilog((hostingContext, loggerConfiguration) => {
    loggerConfiguration.ReadFrom.Configuration(hostingContext.Configuration);
});
  "Serilog": {
    "MinimumLevel": {
      "Default": "Debug",
      "Override": {
        "Microsoft": "Warning",
        "System": "Warning",
        "Microsoft.AspNetCore.Authentication": "Information"
      }
    },
    "WriteTo:ConsoleSublogger": {
      "Name": "Logger",
      "Args": {
        "configureLogger": {
          "WriteTo": [
            {
              "Name": "LiterateConsole",
              "Args": {
                "outputTemplate": "DevConf [{Timestamp:HH:mm:ss} {Level}] {SourceContext}{NewLine}{Message:lj}{NewLine}{Exception}{NewLine}"
              }
            }
          ]
        },
        "restrictedToMinimumLevel": "Debug"
      }
    },
    "Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ],
    "Properties": {
      "Application": "WashuIdentityServer"
    }
  },

I dont see anywhere that I tell it to use a switch. Also, I dont see this on the README and I don't see it in the samples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions