-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
Library name and version
Azure.Messaging.ServiceBus 7.11.1
Describe the bug
I'm dealing with an annoying exception (more info in issue #28759) and in order to avoid it I edited my host.json configuration file to stop logging issues whose log-level is below 'Warning':
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
},
"logLevel": {
"default": "Information",
"Azure.Messaging.ServiceBus": "Warning"
}
},
"logLevel": {
"default": "Information",
"Azure.Messaging.ServiceBus": "Warning"
}
}
}
First I used only the first one, but as it wasn't working, I added the 2nd one too. It's still not working, as I'm still logging on ApplicationInsights exceptions whose log-level is "Information":
Can you help? Thanks!
Expected behavior
The exceptions shouldn't be logged with a loglevel=info. At the same time, as I'm supposedly filtering them (my base level is "Warning") they shouldn't appear on ApplicationInsights.
Actual behavior
I'm getting exceptions with LogLevel=Information in ApplicationInsights.
Reproduction Steps
Add my host.json to any AzureFunction project with a ServiceBusTriggered Method, deploy it, and wait a couple of weeks. You'll see that exceptions of type 'Information' will be logged despite the host.json having predefined the base level to "warning".
Environment
Service Bus Triggered Azure Function