@Zarick-5916 ,
Here are the answers to your questions:
1) I'm using App Service Plan (P1V3, if it matters). Where does the log file actually store, I read something that the logs (/home/LogFiles) is mounted from Azure Files. But I do not see which storage account is actually used for this purpose.
Ans: Yes, Azure functions running on a dedicated app service plan (P1v3) would use Azure Files storage as its File system storage. This is a part of Azure Functions Paas internal architecture and it is not exposed to customers. They are exposed as a folder structure accessible via the Kudu site, for Linux apps, you can SSH into the container and access the log files
2) Does the file system logs (/home/LogFiles) rotated? What is the rotation logic? How long will it keep and how to change the rotation rules?
Ans: There is no rotation logic. There are multiple log files available under the /home/LogFiles directory (Application logs, web server logs etc), retention period would vary accordingly. For application logging, you can specify the retention period : https://learn.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs#enable-application-logging-linuxcontainer
3) For some logging messages, I can see it appears in a few different log files. What is the exact logic of this arrangement?
Ans : Please refer the below article which talks about different log files
https://learn.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs#access-log-files
4) Can I disable all file system logging (which I would like to do it for production) or can I specific all file system logging send to Azure Blob storage (AzureWebJobStorage or something similar).
Ans: By setting “fileLoggingMode” property to “never” in Host.json, the logging can be disabled or by also turning off the App service logs in the portal which you have mentioned below. Unfortunately, sending it to blob storage is only available on windows based Function apps.
https://learn.microsoft.com/en-us/azure/azure-functions/functions-host-json#logging
5) On Portal, there is a page labelled "App Service Logging", where I can switch on 'Application Logging' to 'filesystem' (defaults to OFF).
Ans: This logs refer to application logging mentioned in the Answer (2)
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.