As we are testing in local and would like to having all the logs that printed using iLogger to be saved automatically, hereby we edit our host.json:
{
"version": "2.0",
"logging": {
"fileLoggingMode": "always",
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
},
"enableLiveMetricsFilters": true
}
}
}
The file will be saving into below folder:
C:\Users\<your username>\AppData\Local\Temp\LogFiles\Application\Functions\
Kindly take note that, the logs of the same Azure Function will get cleared each time you retriggered, so it is safe after each run, do a manual backup for that.