<PackageReference Include="Microsoft.Extensions.Logging" Version="10.0.8" />

Microsoft.Extensions.Logging.LoggerFilterRule

public class LoggerFilterRule
Defines a rule used to filter log messages
public string CategoryName { get; }

Gets the logger category this rule applies to.

public Func<string, string, LogLevel, bool> Filter { get; }

Gets the filter delegate that would be applied to messages that passed the LogLevel.

public LogLevel? LogLevel { get; }

Gets the minimum LogLevel of messages.

public string ProviderName { get; }

Gets the logger provider type or alias this rule applies to.

public LoggerFilterRule(string providerName, string categoryName, LogLevel? logLevel, Func<string, string, LogLevel, bool> filter)

Creates a new LoggerFilterRule instance.