/// <summary> /// Add filter, which could filter out log entries by minimal log level for specified component name. /// </summary> public static ILogBuilder AddFilter(this ILogBuilder builder, string componentName, Microsoft.Extensions.Logging.LogLevel minLevel) { return(builder.ConfigureFilter(options => options.AddFilter(componentName, minLevel))); }
/// <summary> /// Add filter, which could filter out log entries by log level for specified component name. /// </summary> public static ILogBuilder AddFilter(this ILogBuilder builder, string componentName, Func <Microsoft.Extensions.Logging.LogLevel, bool> levelFilter) { return(builder.ConfigureFilter(options => options.AddFilter(componentName, levelFilter))); }
/// <summary> /// Adds filter, which could filter out log entries by logger provider name, component name and log level. /// </summary> public static ILogBuilder AddFilter(this ILogBuilder builder, Func <string, string, Microsoft.Extensions.Logging.LogLevel, bool> filter) { return(builder.ConfigureFilter(options => options.AddFilter(filter))); }