question

RamrezLenJosManuel-3730 avatar image
0 Votes"
RamrezLenJosManuel-3730 asked Sumarigo-MSFT edited

How to send Azure Function App logs to Blob Storage?

Hi!

I have created an Azure Function app, written in Python. I can see the live logs in the "log stream" section. However, I would like to store those very logs for later analysis, but I do not know how to do it. Or perhaps they are already being stored somewhere and I do not know where they are. Just to clarify, I am referring to the logs that I have written in my code, not the ones Azure automatically collects.

Can anyone tell me how to tell azure to store my app logs in some blob storage? (Or, alternatively, where they are already being stored.)

Thanks so much in advance!!

azure-functions
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

PierreLucGiguere-5297 avatar image
0 Votes"
PierreLucGiguere-5297 answered PierreLucGiguere-5297 edited

Hi Ramrez,

I believe that this is what you are looking for:

"Azure Functions offers an integration with Azure Monitor Logs to monitor functions. This article shows you how to configure Azure Functions to send system-generated and user-generated logs to Azure Monitor Logs."


Source : https://docs.microsoft.com/en-us/azure/azure-functions/functions-monitor-log-analytics?tabs=csharp

Instead of sending it to "log analytics" you can archive it to a "storage account".

You then need a client tool that works with Azure Storage.

https://docs.microsoft.com/en-us/azure/storage/common/storage-explorers

Let me know if that helps.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.