mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
fix(logging): 🐛🚧 temp log runtime AppInsights key to debug
This commit is contained in:
parent
04b268eba0
commit
ba6360046e
1 changed files with 5 additions and 0 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue