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.
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
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 -
- Your Azure Function's Application Insights
- Click on 'View Application Insights data'
- Then on the left nav bar look for 'Transaction Search' and click it
- Finally, click the center button 'See all data in the last 24 hours'
Wait for it to load your logs, and hopefully if everything is setup correctly you'll see your logs there.