fix(logging): 🐛🚧 temp log runtime AppInsights key to debug

This commit is contained in:
Collin M. Barrett 2020-09-24 18:55:57 -05:00
parent 04b268eba0
commit ba6360046e

View file

@ -1,5 +1,6 @@
using System;
using System.Threading.Tasks;
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
@ -23,6 +24,10 @@ public static async Task TryRunWithLoggingAsync(this IHost host, Func<Task>? run
try
{
// TODO: rm, for debugging
var client = host.Services.GetService<TelemetryClient>();
Log.Warning("Application Insights Instrumentation Key: {InstrumentationKey}", client.InstrumentationKey);
if (runPreHostAsync != null)
{
Log.Information("Initializing pre-host");