Can we save azure functions logs to a file?
02:08 16 Aug 2022

I know this might be a repeated question, but I am asking it again because I am not able to find any specific answer.

I am new to Azure functions. I have written an Azure functions in Java. I have a requirement to save the logs into files which will be Daily rolling log files (i.e. new log file should be created each day with the name %fileName%_ddmmyy)

When I use context.getLogger() , I am able to see the logs under Application Insights and Azure Monitor, but I cant find any option to save them into a log file. If I use Log4j, etc, I cannot see the logs under Application Insights and Azure Monitor.

I want to be able to see the logs under Application Insights and Azure Monitor as well as save them to log file which will rotate daily.

Is there any way using which I can achieve this scenario ? Any help would be appreciated. PS : I need it in Java only. I am using java8.

azure azure-functions