Application Logs can not be forward though Diagnostic setting

77 Views Asked by At

I have a azure function app, and i want to forward the application log to storage account for the future analysis & monitoring. However, the metrics are forwarded successfully, but the application log can not be seen, also we configured a event hub as another destination, but still, only the metrics can be seen, not the application logs.

The application log should be seen in Blob Storage

1

There are 1 best solutions below

0
Vivek Vaibhav Shandilya On

I was able to get the logs in azure storage account using this method. I have create a function app with timer trigger function timer_trigger.

enter image description here

You can do the settings in either Function App OR Application Insights.

I have performed action in Application insights.

  • Open Application Insights of the Function App.
  • Go to Monitoring -> Diagnostic settings -> add diagnostic setting enter image description here
  • create a Diagnostic setting and select all logs and select Archieve to storage account and Save it. enter image description here
  • After some time, the logs will start to save in storage account in blob with name insights-logs-<category name>.

Note:- sometimes it takes time to generate logs through diagnostic settings.

When you create Diagnostic Setting in **Function App ** only two option will be available. logs will be saved in blob name with same insights-logs-<category name> and Providers show as Microsoft.web as shown below:

enter image description here

enter image description here

Output:

enter image description here

enter image description here

enter image description here

enter image description here