Beispiel #1
0
 /// <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)));
 }
Beispiel #2
0
 /// <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)));
 }
Beispiel #3
0
 /// <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)));
 }