log level can be configured in host.json file:
In my app in addition to host.json i have appsettings for dev/test/prod. The appsettingsfiles does not specify anything about loglevel, and nothing about application insight loglevel.
Does host.json impose its configured log-level to all environments, including application insight loggin?
Does host.json impose its configured log-level to all environments, including application insight loggin?
Yes, host.json configures application insights and logs function app logs to application insights.
In Host.json we will set the logging configurations which are used after deploying the function app.
Example:
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
}
AzureWebJobsStorage
, FUNCTIONS_WORKER_RUNTIME
,APPINSIGHTS_INSTRUMENTATIONKEY
Example:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"APPINSIGHTS_INSTRUMENTATIONKEY": "27ef877b-5298-4cd9-8a45-a6b99bcc395d"
}
}
References taken from: