Is there a way to view logging of my Azure Function App without the use of Application Insights?
Can I write the logging of my Function app to a separate file that I can view? (edit) If so, how?
Edit: I should have mentioned that I am using Java.
Is there a way to view logging of my Azure Function App without the use of Application Insights?
Can I write the logging of my Function app to a separate file that I can view? (edit) If so, how?
Edit: I should have mentioned that I am using Java.
2
Answers
yes, I do agree with the point mentioned by @Thiago Custodio. you can use serilog in the Azure functions to view your logs.
Here is the code provided by @Ivan Yang in this So for using Serilg in Azure functions.
Diagnostic Settings will be of help here. You can enable diagnostics to publish the logs to a storage account.
To set the settings. Search for
Diagnostic settings
in the search-pane of your function app.And then enable by providing the storage account details:
For full information refer: https://learn.microsoft.com/en-us/azure/azure-functions/functions-monitor-log-analytics?tabs=java
The benefit of this is: that you can continue to log using the default logging framework that the azure-functions provide. There isn’t any code change that is required.