How do I get my custom logger's logging level from configuration?

104 Views Asked by At

In .NET Core, the logging level may be configured based on an hierarchical configuration model:

https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/#configure-logging

Now, when I write a custom logger, derived from ILogger, how do I determine my logger's logging level at runtime, so I can return a proper result in ILogger::IsEnabled()?

0

There are 0 best solutions below