11 instantiations of LoggerFilterOptions
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\DiagnosticReporterLoggerProvider.cs (1)
33new LoggerFilterOptions() { MinLevel = LogLevel.Warning });
Microsoft.Extensions.Logging (1)
LoggerFactory.cs (1)
42public LoggerFactory(IEnumerable<ILoggerProvider> providers) : this(providers, new StaticFilterOptionsMonitor(new LoggerFilterOptions()))
Microsoft.Extensions.Telemetry.Tests (9)
Logging\ExtendedLoggerTests.cs (8)
48filterOptions: new StaticOptionsMonitor<LoggerFilterOptions>(new()), 138filterOptions: new StaticOptionsMonitor<LoggerFilterOptions>(new()), 203filterOptions: new StaticOptionsMonitor<LoggerFilterOptions>(new()), 264filterOptions: new StaticOptionsMonitor<LoggerFilterOptions>(new()), 300var filterOptions = new LoggerFilterOptions(); 336filterOptions: new StaticOptionsMonitor<LoggerFilterOptions>(new()), 369filterOptions: new StaticOptionsMonitor<LoggerFilterOptions>(new()), 403filterOptions: new StaticOptionsMonitor<LoggerFilterOptions>(new()),
Logging\SerialExtendedLoggerTests.cs (1)
42filterOptions: new StaticOptionsMonitor<LoggerFilterOptions>(new()),
92 references to LoggerFilterOptions
Aspire.Dashboard.Tests (3)
Integration\IntegrationTestHelpers.cs (1)
82builder.Services.PostConfigure<LoggerFilterOptions>(o =>
Integration\StartupTests.cs (2)
497var options = app.Services.GetRequiredService<IOptions<LoggerFilterOptions>>(); 536var options = app.Services.GetRequiredService<IOptions<LoggerFilterOptions>>();
Aspire.Hosting (1)
Dashboard\DashboardServiceHost.cs (1)
55IConfigureOptions<LoggerFilterOptions> loggerOptions,
ClientSample (1)
HubSample.cs (1)
40connectionBuilder.Services.Configure<LoggerFilterOptions>(options =>
Microsoft.Extensions.Logging (52)
DefaultLoggerLevelConfigureOptions.cs (1)
8internal sealed class DefaultLoggerLevelConfigureOptions : ConfigureOptions<LoggerFilterOptions>
FilterLoggingBuilderExtensions.cs (35)
109public static LoggerFilterOptions AddFilter(this LoggerFilterOptions builder, Func<string?, string?, LogLevel, bool> filter) => 115/// <param name="builder">The <see cref="LoggerFilterOptions"/> to add the filter to.</param> 117/// <returns>The <see cref="LoggerFilterOptions"/> so that additional calls can be chained.</returns> 118public static LoggerFilterOptions AddFilter(this LoggerFilterOptions builder, Func<string?, LogLevel, bool> categoryLevelFilter) => 124/// <param name="builder">The <see cref="LoggerFilterOptions"/> to add the filter to.</param> 127/// <returns>The <see cref="LoggerFilterOptions"/> so that additional calls can be chained.</returns> 128public static LoggerFilterOptions AddFilter<T>(this LoggerFilterOptions builder, Func<string?, LogLevel, bool> categoryLevelFilter) where T : ILoggerProvider => 134/// <param name="builder">The <see cref="LoggerFilterOptions"/> to add the filter to.</param> 136/// <returns>The <see cref="LoggerFilterOptions"/> so that additional calls can be chained.</returns> 137public static LoggerFilterOptions AddFilter(this LoggerFilterOptions builder, Func<LogLevel, bool> levelFilter) => 143/// <param name="builder">The <see cref="LoggerFilterOptions"/> to add the filter to.</param> 146/// <returns>The <see cref="LoggerFilterOptions"/> so that additional calls can be chained.</returns> 147public static LoggerFilterOptions AddFilter<T>(this LoggerFilterOptions builder, Func<LogLevel, bool> levelFilter) where T : ILoggerProvider => 153/// <param name="builder">The <see cref="LoggerFilterOptions"/> to add the filter to.</param> 156/// <returns>The <see cref="LoggerFilterOptions"/> so that additional calls can be chained.</returns> 157public static LoggerFilterOptions AddFilter(this LoggerFilterOptions builder, string? category, LogLevel level) => 163/// <param name="builder">The <see cref="LoggerFilterOptions"/> to add the filter to.</param> 167/// <returns>The <see cref="LoggerFilterOptions"/> so that additional calls can be chained.</returns> 168public static LoggerFilterOptions AddFilter<T>(this LoggerFilterOptions builder, string? category, LogLevel level) where T : ILoggerProvider => 174/// <param name="builder">The <see cref="LoggerFilterOptions"/> to add the filter to.</param> 177/// <returns>The <see cref="LoggerFilterOptions"/> so that additional calls can be chained.</returns> 178public static LoggerFilterOptions AddFilter(this LoggerFilterOptions builder, string? category, Func<LogLevel, bool> levelFilter) => 189public static LoggerFilterOptions AddFilter<T>(this LoggerFilterOptions builder, string? category, Func<LogLevel, bool> levelFilter) where T : ILoggerProvider => 192private static ILoggingBuilder ConfigureFilter(this ILoggingBuilder builder, Action<LoggerFilterOptions> configureOptions) 198private static LoggerFilterOptions AddRule(LoggerFilterOptions options,
LoggerFactory.cs (7)
27private LoggerFilterOptions _filterOptions; 51public LoggerFactory(IEnumerable<ILoggerProvider> providers, LoggerFilterOptions filterOptions) : this(providers, new StaticFilterOptionsMonitor(filterOptions)) 60public LoggerFactory(IEnumerable<ILoggerProvider> providers, IOptionsMonitor<LoggerFilterOptions> filterOption) : this(providers, filterOption, null) 70public LoggerFactory(IEnumerable<ILoggerProvider> providers, IOptionsMonitor<LoggerFilterOptions> filterOption, IOptions<LoggerFactoryOptions>? options) : this(providers, filterOption, options, null) 81public LoggerFactory(IEnumerable<ILoggerProvider> providers, IOptionsMonitor<LoggerFilterOptions> filterOption, IOptions<LoggerFactoryOptions>? options = null, IExternalScopeProvider? scopeProvider = null) 121private void RefreshFilters(LoggerFilterOptions filterOptions) 331public LoggerFilterOptions FilterOptions => loggerFactory._filterOptions;
LoggerFilterOptions.cs (1)
16/// Creates a new <see cref="LoggerFilterOptions"/> instance.
LoggerRuleSelector.cs (1)
10public static void Select(LoggerFilterOptions options, Type providerType, string category, out LogLevel? minLevel, out Func<string?, string?, LogLevel, bool>? filter)
LoggingBuilderExtensions.cs (1)
24builder.Services.Add(ServiceDescriptor.Singleton<IConfigureOptions<LoggerFilterOptions>>(
LoggingServiceCollectionExtensions.cs (1)
41services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<LoggerFilterOptions>>(
StaticFilterOptionsMonitor.cs (5)
9internal sealed class StaticFilterOptionsMonitor : IOptionsMonitor<LoggerFilterOptions> 11public StaticFilterOptionsMonitor(LoggerFilterOptions currentValue) 16public IDisposable? OnChange(Action<LoggerFilterOptions, string> listener) => null; 18public LoggerFilterOptions Get(string? name) => CurrentValue; 20public LoggerFilterOptions CurrentValue { get; }
Microsoft.Extensions.Logging.AzureAppServices (6)
AzureAppServicesLoggerFactoryExtensions.cs (4)
65services.AddSingleton<IOptionsChangeTokenSource<LoggerFilterOptions>>( 66new ConfigurationChangeTokenSource<LoggerFilterOptions>(config)); 71services.AddSingleton<IConfigureOptions<LoggerFilterOptions>>(CreateFileFilterConfigureOptions(config)); 80services.AddSingleton<IConfigureOptions<LoggerFilterOptions>>(CreateBlobFilterConfigureOptions(config));
ConfigurationBasedLevelSwitcher.cs (2)
10internal sealed class ConfigurationBasedLevelSwitcher : IConfigureOptions<LoggerFilterOptions> 23public void Configure(LoggerFilterOptions options)
Microsoft.Extensions.Logging.Configuration (8)
LoggerFilterConfigureOptions.cs (4)
10internal sealed class LoggerFilterConfigureOptions : IConfigureOptions<LoggerFilterOptions> 21public void Configure(LoggerFilterOptions options) 26private void LoadDefaultConfigValues(LoggerFilterOptions options) 55private static void LoadRules(LoggerFilterOptions options, IConfigurationSection configurationSection, string? logger)
LoggingBuilderExtensions.cs (4)
17/// Configures <see cref="LoggerFilterOptions" /> from an instance of <see cref="IConfiguration" />. 26builder.Services.AddSingleton<IConfigureOptions<LoggerFilterOptions>>(new LoggerFilterConfigureOptions(configuration)); 27builder.Services.AddSingleton<IOptionsChangeTokenSource<LoggerFilterOptions>>(new ConfigurationChangeTokenSource<LoggerFilterOptions>(configuration));
Microsoft.Extensions.Logging.EventSource (5)
EventLogFiltersConfigureOptions.cs (2)
9internal sealed class EventLogFiltersConfigureOptions : IConfigureOptions<LoggerFilterOptions> 18public void Configure(LoggerFilterOptions options)
EventLogFiltersConfigureOptionsChangeSource.cs (1)
10internal sealed class EventLogFiltersConfigureOptionsChangeSource : IOptionsChangeTokenSource<LoggerFilterOptions>
EventSourceLoggerFactoryExtensions.cs (2)
45builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<LoggerFilterOptions>, EventLogFiltersConfigureOptions>()); 46builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IOptionsChangeTokenSource<LoggerFilterOptions>, EventLogFiltersConfigureOptionsChangeSource>());
Microsoft.Extensions.Telemetry (4)
Logging\ExtendedLoggerFactory.cs (3)
29private LoggerFilterOptions _filterOptions; 37IOptionsMonitor<LoggerFilterOptions> filterOptions, 178private void RefreshFilters(LoggerFilterOptions filterOptions)
Logging\Import\LoggerRuleSelector.cs (1)
15public static void Select(LoggerFilterOptions options, Type providerType, string category, out LogLevel? minLevel, out Func<string?, string?, LogLevel, bool>? filter)
Microsoft.Extensions.Telemetry.Tests (12)
Logging\ExtendedLoggerTests.cs (11)
48filterOptions: new StaticOptionsMonitor<LoggerFilterOptions>(new()), 138filterOptions: new StaticOptionsMonitor<LoggerFilterOptions>(new()), 203filterOptions: new StaticOptionsMonitor<LoggerFilterOptions>(new()), 264filterOptions: new StaticOptionsMonitor<LoggerFilterOptions>(new()), 300var filterOptions = new LoggerFilterOptions(); 306filterOptions: new StaticOptionsMonitor<LoggerFilterOptions>(filterOptions), 336filterOptions: new StaticOptionsMonitor<LoggerFilterOptions>(new()), 369filterOptions: new StaticOptionsMonitor<LoggerFilterOptions>(new()), 403filterOptions: new StaticOptionsMonitor<LoggerFilterOptions>(new()), 673builder.Services.Configure<LoggerFilterOptions>(options => options.CaptureScopes = false); 703builder.Services.Configure<LoggerFilterOptions>(options => options.CaptureScopes = false);
Logging\SerialExtendedLoggerTests.cs (1)
42filterOptions: new StaticOptionsMonitor<LoggerFilterOptions>(new()),