Skip to content

"Azure.Messaging.ServiceBus": "Warning" in host.json does not prevent the logging of "Information" #33516

@luisgmgouveia

Description

@luisgmgouveia

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":

image

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

Metadata

Metadata

Assignees

Labels

ClientThis issue is related to a non-management packageFunctionsService Buscustomer-reportedIssues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions