30 references to ConsoleLoggerOptions
Microsoft.Extensions.Hosting.Systemd (1)
SystemdHostBuilderExtensions.cs (1)
81services.Configure<ConsoleLoggerOptions>(options =>
Microsoft.Extensions.Logging.Console (29)
ConsoleLogger.cs (2)
27ConsoleLoggerOptions options) 40internal ConsoleLoggerOptions Options { get; set; }
ConsoleLoggerConfigureOptions.cs (2)
19internal sealed class ConsoleLoggerConfigureOptions : IConfigureOptions<ConsoleLoggerOptions> 29public void Configure(ConsoleLoggerOptions options) => _configuration.Bind(options);
ConsoleLoggerExtensions.cs (5)
40builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<ConsoleLoggerOptions>, ConsoleLoggerConfigureOptions>()); 41builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IOptionsChangeTokenSource<ConsoleLoggerOptions>, LoggerProviderOptionsChangeTokenSource<ConsoleLoggerOptions, ConsoleLoggerProvider>>()); 51public static ILoggingBuilder AddConsole(this ILoggingBuilder builder, Action<ConsoleLoggerOptions> configure) 124builder.AddConsole((ConsoleLoggerOptions options) => options.FormatterName = name);
ConsoleLoggerExtensions.Obsolete.cs (14)
129private sealed class ConsoleLoggerSettingsAdapter : IConfigureOptions<ConsoleLoggerOptions>, IOptionsChangeTokenSource<ConsoleLoggerOptions> 137IChangeToken IOptionsChangeTokenSource<ConsoleLoggerOptions>.GetChangeToken() => _settings.ChangeToken ?? NullChangeToken.Instance; 139string IOptionsChangeTokenSource<ConsoleLoggerOptions>.Name => Options.Options.DefaultName; 141void IConfigureOptions<ConsoleLoggerOptions>.Configure(ConsoleLoggerOptions options) 154internal static OptionsMonitor<ConsoleLoggerOptions> GetOptionsMonitor(IConsoleLoggerSettings settings) 157OptionsFactory<ConsoleLoggerOptions> factory = new(new IConfigureOptions<ConsoleLoggerOptions>[] { adapter }, Array.Empty<IPostConfigureOptions<ConsoleLoggerOptions>>()); 158IOptionsChangeTokenSource<ConsoleLoggerOptions>[] sources = new IOptionsChangeTokenSource<ConsoleLoggerOptions>[] { adapter }; 159OptionsCache<ConsoleLoggerOptions> cache = new(); 161return new OptionsMonitor<ConsoleLoggerOptions>(factory, sources, cache);
ConsoleLoggerProcessor.cs (1)
20private int _maxQueuedMessages = ConsoleLoggerOptions.DefaultMaxQueueLengthValue;
ConsoleLoggerProvider.cs (5)
21private readonly IOptionsMonitor<ConsoleLoggerOptions> _options; 33public ConsoleLoggerProvider(IOptionsMonitor<ConsoleLoggerOptions> options) 41public ConsoleLoggerProvider(IOptionsMonitor<ConsoleLoggerOptions> options, IEnumerable<ConsoleFormatter>? formatters) 125private void ReloadLoggerOptions(ConsoleLoggerOptions options) 177private static void UpdateFormatterOptions(ConsoleFormatter formatter, ConsoleLoggerOptions deprecatedFromOptions)