Skip to content

I can't make LogLevel work #41

@rodrigomocca

Description

@rodrigomocca

Hi,
I'm trying the extension, and it's working great, but I can't get Debug Levels logged.
I've settled up the app.settings like this:

"Logging": {
    "PathFormat": "Logs/log-{Date}.txt",
    "LogLevel": {
      "Default": "Debug",
      "Microsoft": "Information"
    }
  },

And the Startup.cs like this:
loggerFactory.AddFile(Configuration.GetSection("Logging"));

I'm trying really simple from a controller:
_logger.LogDebug("TestController");

But the log is not in the file. If I change
_logger.LogDebug("TestController") to _logger.LogInformation("TestController"); the log shows in the log file as expected.

What I'm doing wrong?

Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions