How to send Azure Function App logs to Blob Storage?

Ramírez León, José Manuel 1 Reputation point
2021-09-08T16:15:09.443+00:00

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
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,518 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pierre-Luc Giguere 1,076 Reputation points
    2021-09-08T18:07:42.607+00:00

    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://learn.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://learn.microsoft.com/en-us/azure/storage/common/storage-explorers

    Let me know if that helps.

    1 person found this answer helpful.
    0 comments No comments