You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Using preview package Microsoft.Azure.Functions.Worker.ApplicationInsights, see https://github.com/Azure/azure-functions-dotnet-worker/pull/944
33
-
// Requires APPLICATIONINSIGHTS_CONNECTION_STRING being set. Note that host.json logging settings will have to be replicated to worker.json
34
+
// Requires APPLICATIONINSIGHTS_CONNECTION_STRING being set. Note that host.json logging settings are not loaded to worker, and requires
34
35
.AddApplicationInsights()
35
36
.AddApplicationInsightsLogger();
36
37
}, options =>
@@ -43,11 +44,33 @@ public static IHostBuilder ConfigureDanPluginDefaults(this IHostBuilder builder)
43
44
NullValueHandling=NullValueHandling.Ignore
44
45
});
45
46
})
47
+
.ConfigureAppConfiguration((config)=>
48
+
{
49
+
config.AddJsonFile("host.json",optional:true);
50
+
config.AddJsonFile("worker.json",optional:true);
51
+
})
46
52
.ConfigureServices((context,services)=>
47
53
{
48
54
services.AddLogging();
49
55
services.AddHttpClient();
50
56
57
+
// You will need extra configuration because AI will only log per default Warning (default AI configuration). As this is a provider-specific
58
+
// setting, it will override all non-provider (Logging:LogLevel)-based configurations.
0 commit comments