From 210cfde07e8678469844da3396dbf601da7e8142 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Fri, 25 Sep 2020 17:46:19 -0500 Subject: [PATCH] =?UTF-8?q?fix(logging):=20=F0=9F=90=9B=20try=20Active=20T?= =?UTF-8?q?elemetryConfig=20to=20fix=20logging=20to=20AppInsights?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FilterLists.SharedKernel.Logging/HostRunner.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/SharedKernel/FilterLists.SharedKernel.Logging/HostRunner.cs b/services/SharedKernel/FilterLists.SharedKernel.Logging/HostRunner.cs index d5f30cecf7..a0559a11ab 100644 --- a/services/SharedKernel/FilterLists.SharedKernel.Logging/HostRunner.cs +++ b/services/SharedKernel/FilterLists.SharedKernel.Logging/HostRunner.cs @@ -17,7 +17,9 @@ public static async Task TryRunWithLoggingAsync(this IHost host, Func? run .WriteTo.Conditional( _ => host.Services.GetService().IsProduction(), c => c.ApplicationInsights( - host.Services.GetRequiredService(), +#pragma warning disable CS0618 + TelemetryConfiguration.Active, +#pragma warning restore CS0618 TelemetryConverter.Traces)) .CreateLogger();