I really need to turn off logging for the health check function in my Azure functions app because it's just spamming ApplicationInsights with noise.
The documentation at https://learn.microsoft.com/en-us/azure/azure-functions/functions-host-json implies that this is something to do with the logging.logLevel
object in the host.json
file, but it's unclear what to put on the left hand side of the :
.
This is what I've got. The only thing that has any effect is the Host.Results
that makes all logging stop.
"logging": {
"logLevel": {
"default": "Trace",
"System": "Warning",
"Microsoft": "Warning",
"MyCompany.CalculationsService.Functions.HealthFunction": "Warning",
"MyCompany.CalculationsService.Functions.HealthFunction.Health": "Warning",
"Functions.Health": "Warning",
"Functions.Health.User": "Warning",
"Function.Health": "Warning",
"Function.Health.User": "Warning",
"Health": "Warning",
//"Host.Results": "Warning" // This turns off everything.
},
Is this even possile at all? Is it just all or nothing?