Home > other >  Find the logs created by logging library in azure portal
Find the logs created by logging library in azure portal

Time:06-17

I built a python function in Azure. I used the library logging to record some important steps in my function. I am using the level "info" of this library. My question is how do I find the logs created after execution in Azure portal?. I would like to see these logs to validate the execution of my function.

Tks in advance

Update 1:

I found in the Microsoft documentation:

Logging Access to the Azure Functions runtime logger is available via a root logging handler in your function app. This logger is tied to Application Insights and allows you to flag warnings and errors that occur during the function execution.

enter image description here

The logs are seemly the standard one that Azure has.

CodePudding user response:

Few things -

  • Have you enabled Application Insights? And setup the the storage account for logs?
  • Can you see Application Insights related configs in your Configuration > Application Settings

enter image description here

If the above are all fine, without your code snippet its hard to tell if there's something wrong.

To see the logs, try navigating to -

  1. Your Azure Function's Application Insights
  2. Click on 'View Application Insights data'
  3. Then on the left nav bar look for 'Transaction Search' and click it
  4. Finally, click the center button 'See all data in the last 24 hours'

enter image description here

enter image description here

Wait for it to load your logs, and hopefully if everything is setup correctly you'll see your logs there.

enter image description here

  • Related