I have developed Azure Function which uses log4net for logging and it is configured via file. Locally it works okay, but when I deploy it on Azure I receive error: System.Private.CoreLib: Could not find file '/azure-functions-host/log4net.config'
I am using Linux App Service and I'm unable to find folder 'azure-functions-host' on the file system.
CodePudding user response:
From the function app, the log4net is to be initialized using the repository
object as shown in this example. And also, if linux
is used for hosting the App Service, then the path for the log file to be set as "/home/site/wwwroot/Log4Net/function.log"