Skip to content

LoggerProviderDebugView doesn't seem to report the correct log level #103208

Closed
@joegoldman2

Description

Description

LoggerProviderDebugView doesn't seem to report the correct log level when the level is configured to None. I tested with all other levels and the correct value is reported each time.

Reproduction Steps

using Microsoft.Extensions.Logging.Console;

var services = new ServiceCollection();
services.AddLogging(builder =>
{
    builder.AddConsole();
    builder.AddFilter<ConsoleLoggerProvider>(null, LogLevel.None);
});
using var provider = services.BuildServiceProvider();
var logger = provider.GetRequiredService<ILogger<Program>>();

Expected behavior

The log level for the Console provider should be None.

Actual behavior

Screenshot

Regression?

No

Known Workarounds

No response

Configuration

9.0.100-preview.4.24267.66

Other information

No response

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions