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