mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
fix(logging): 🐛 try Active TelemetryConfig to fix logging to AppInsights
This commit is contained in:
parent
3e1de9b164
commit
210cfde07e
1 changed files with 3 additions and 1 deletions
|
|
@ -17,7 +17,9 @@ public static async Task TryRunWithLoggingAsync(this IHost host, Func<Task>? run
|
|||
.WriteTo.Conditional(
|
||||
_ => host.Services.GetService<IHostEnvironment>().IsProduction(),
|
||||
c => c.ApplicationInsights(
|
||||
host.Services.GetRequiredService<TelemetryConfiguration>(),
|
||||
#pragma warning disable CS0618
|
||||
TelemetryConfiguration.Active,
|
||||
#pragma warning restore CS0618
|
||||
TelemetryConverter.Traces))
|
||||
.CreateLogger();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue