Search code examples
javaazureazure-functionsazure-application-insights

Logging Azure Function


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.


Solution

  • 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. enter image description here And then enable by providing the storage account details: enter image description here

    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.