-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
The default log level for Azure Functions is set to Information. When lowering this level in the hosts.json to Debug, e.g.
{
"version": "2.0",
"logging": {
"logLevel": {
"default": "Debug"
}
}
}
debug log statements from NServiceBus, but also from user code that is using the logger retrieved via executionContext.GetLogger does not show up.
There is a corresponding issue in Microsoft's azure functions worker repo: Azure/azure-functions-dotnet-worker#573 (marked as duplicate of Azure/azure-functions-dotnet-worker#1125). This doesn't seem to be a NServiceBus related problem as this repro-sample doesn't use NSB at all.
The workaround to get the debug log statements working is to configure the logger on the host builder configuration in addition to the hosts.json:
var host = new HostBuilder()
.ConfigureFunctionsWorkerDefaults()
.ConfigureLogging(l =>
{
l.SetMinimumLevel(LogLevel.Debug);
})
...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels