I'm getting a massive amount of verbose and information level logging in my Application Insights log stream when running my durable function. I tried to disable these with host.json and Serilog config without any luck.
Log output
DI
I'm using dependency injection, but nothing specific for logging (only self created classes).
host.json
{
"version": "2.0",
"logging": {
"logLevel": {
"default": "Warning",
"DurableTask.AzureStorage": "Warning",
"DurableTask.Core": "Warning",
"Host.Triggers.DurableTask": "Warning",
"Function": "Warning",
},
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Exception"
}
}
}
}
It seems that host.json is ignored and everything is pushed to the log stream.
Serilog
I also tried to add Serilog to handle the logging with the following code, but it has the same result, verbose logging is still pushed to Application Insights
[assembly: FunctionsStartup(typeof(MultiHop.Functions.Startup))]
namespace MultiHop.Functions
{
public class Startup : FunctionsStartup
{
public override void Configure(IFunctionsHostBuilder builder)
{
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Warning()
.MinimumLevel.Override("Host.Triggers.DurableTask", LogEventLevel.Warning)
.MinimumLevel.Override("DurableTask.Core", LogEventLevel.Warning)
.MinimumLevel.Override("DurableTask.AzureStorage", LogEventLevel.Warning)
.MinimumLevel.Override("Function", LogEventLevel.Warning)
.Enrich.FromLogContext()
.Enrich.WithExceptionDetails()
.WriteTo.Console(LogEventLevel.Warning, theme: SystemConsoleTheme.Literate)
.CreateLogger();
builder.Services.AddLogging(configure => configure.AddSerilog(Log.Logger, true));
}
}
}
Any idea how I can disable this verbose and information logging?

