13 instantiations of LoggerEnrichmentOptions
Microsoft.Extensions.Telemetry (2)
Logging\ExtendedLoggerFactory.cs (2)
93
Config = ComputeConfig(enrichmentOptions?.CurrentValue ??
new
(), redactionOptions?.CurrentValue ?? new() { ApplyDiscriminator = false });
268
enrichmentOptions = new
LoggerEnrichmentOptions
Microsoft.Extensions.Telemetry.Tests (11)
Logging\ExtendedLoggerTests.cs (8)
43
var enrichmentOptions = enableEnrichment ? new StaticOptionsMonitor<LoggerEnrichmentOptions>(
new
()) : null;
139
enrichmentOptions: new StaticOptionsMonitor<LoggerEnrichmentOptions>(
new
()),
204
enrichmentOptions: new StaticOptionsMonitor<LoggerEnrichmentOptions>(
new
()),
265
enrichmentOptions: new StaticOptionsMonitor<LoggerEnrichmentOptions>(
new
()),
307
enrichmentOptions: new StaticOptionsMonitor<LoggerEnrichmentOptions>(
new
()),
337
enrichmentOptions: new StaticOptionsMonitor<LoggerEnrichmentOptions>(
new
()),
370
enrichmentOptions: new StaticOptionsMonitor<LoggerEnrichmentOptions>(
new
()),
393
var stackTraceOptions = new
LoggerEnrichmentOptions
Logging\LoggerEnrichmentOptionsTests.cs (2)
16
var o = new
LoggerEnrichmentOptions
();
32
var o = new
LoggerEnrichmentOptions
();
Logging\SerialExtendedLoggerTests.cs (1)
23
var stackTraceOptions = new
LoggerEnrichmentOptions
();
21 references to LoggerEnrichmentOptions
Microsoft.Extensions.Telemetry (8)
Logging\ExtendedLoggerFactory.cs (3)
40
IOptionsMonitor<
LoggerEnrichmentOptions
>? enrichmentOptions = null,
264
private LoggerConfig ComputeConfig(
LoggerEnrichmentOptions
? enrichmentOptions, LoggerRedactionOptions? redactionOptions)
295
private void UpdateEnrichmentOptions(
LoggerEnrichmentOptions
enrichmentOptions) => Config = ComputeConfig(enrichmentOptions, null);
Logging\LoggerEnrichmentOptionsValidator.cs (1)
9
internal sealed partial class LoggerEnrichmentOptionsValidator : IValidateOptions<
LoggerEnrichmentOptions
>
Logging\LoggingEnrichmentExtensions.cs (4)
32
public static ILoggingBuilder EnableEnrichment(this ILoggingBuilder builder, Action<
LoggerEnrichmentOptions
> configure)
39
_ = builder.Services.AddOptionsWithValidateOnStart<
LoggerEnrichmentOptions
, LoggerEnrichmentOptionsValidator>();
48
/// <param name="section">Configuration section that contains <see cref="
LoggerEnrichmentOptions
"/>.</param>
56
_ = builder.Services.AddOptionsWithValidateOnStart<
LoggerEnrichmentOptions
, LoggerEnrichmentOptionsValidator>().Bind(section);
Microsoft.Extensions.Telemetry.Tests (13)
Logging\ExtendedLoggerTests.cs (9)
43
var enrichmentOptions = enableEnrichment ? new StaticOptionsMonitor<
LoggerEnrichmentOptions
>(new()) : null;
139
enrichmentOptions: new StaticOptionsMonitor<
LoggerEnrichmentOptions
>(new()),
204
enrichmentOptions: new StaticOptionsMonitor<
LoggerEnrichmentOptions
>(new()),
265
enrichmentOptions: new StaticOptionsMonitor<
LoggerEnrichmentOptions
>(new()),
307
enrichmentOptions: new StaticOptionsMonitor<
LoggerEnrichmentOptions
>(new()),
337
enrichmentOptions: new StaticOptionsMonitor<
LoggerEnrichmentOptions
>(new()),
370
enrichmentOptions: new StaticOptionsMonitor<
LoggerEnrichmentOptions
>(new()),
393
var
stackTraceOptions = new LoggerEnrichmentOptions
404
enrichmentOptions: new StaticOptionsMonitor<
LoggerEnrichmentOptions
>(stackTraceOptions),
Logging\LoggerEnrichmentOptionsTests.cs (2)
16
var
o = new LoggerEnrichmentOptions();
32
var
o = new LoggerEnrichmentOptions();
Logging\SerialExtendedLoggerTests.cs (2)
23
var
stackTraceOptions = new LoggerEnrichmentOptions();
43
enrichmentOptions: new StaticOptionsMonitor<
LoggerEnrichmentOptions
>(stackTraceOptions),