I have a C# Azure Function app that gets deployed via DevOps build and release pipeline.
It was running on the v3 Functions runtime. I've recently updated the project file and bicep template of the function app so that it runs on v4.
The app is configured to log to Azure Sql through Serilog. since the update I've noticed many thousands of additional log entries from the Azure Functions Host
The logging section of my appsettings.json file is shown below. My understanding is these would be used where equivalent values are available to the Function App as environment variables - through the configuration settings section of the function app?
"Logging": {
"LogLevel": {
"Default": "Error"
},
"ApplicationInsights": {
"LogLevel": {
"Default": "Information"
}
}
}
I tried following the answer to this post in order to suppress the logging by adding the following entries in the function app's application settings:
"name": "AzureFunctionsJobHost__Logging__LogLevel__Microsoft",
"value": "Error"
"name": "AzureFunctionsJobHost__Logging__LogLevel__Azure",
"value": "Error"
I restarted the function app but noticed no difference in the logs. Here's an example of one of the unwanted log records (all logged with a with a level of "Information"):
<properties>
<property key='requestId'>bcc9a52c-fb8b-4a89-bb1c-9ed08eb305c4</property>
<property key='status'>200</property>
<property key='reasonPhrase'>OK</property>
<property key='seconds'>0.0048284</property>
<property key='EventSourceEvent'>Response [bcc9a52c-fb8b-4a89-bb1c-9ed08eb305c4] 200 OK (00.0s)</property>
<property key='EventId'>
<structure type=''>
<property key='Id'>5</property>
<property key='Name'>Response</property>
</structure>
</property>
<property key='SourceContext'>Azure.Core</property>