There's a question/answer explaining how to get rid of specific exceptions:
Preventing Specific Exceptions from being logged to app insights
I don't need anything as complex as this, as I want to get rid of all exceptions of type info (LogLevel=info) for namespace "Azure.Messaging.ServiceBus". Is this possible? I tried the following:
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
},
"logLevel": {
"default": "Information",
"Azure.Messaging.ServiceBus": "Warning"
}
},
"logLevel": {
"default": "Information",
"Azure.Messaging.ServiceBus": "Warning",
}
}
}
host.json
Unfortunately it doesn't work, as "Exceptions are logged at the Error level.": Azure Functions Monitoring Log Level Categories
I was now looking to the "isExceptionSnappointsEnabled" flag, which might be what I want, but I'm not sure. Can you help me?
The value of the log level configures the logger to send logs of that severity or higher. You can refer to this table for the levels available.
In your case, you could set the value to
Warning
or higher level.