Azure functions: Zip deploy logs auto-deleted after a random period of time

Eber Bezzone 16 Reputation points
2021-07-25T14:27:16.073+00:00

I've been deploying azure functions (zip deploy) through:

  • ApiRest (scm.azurewebsites.net/api/zipdeploy)
  • Az-Cli
  • Java SDK (zipDeploy)

and I face the same problem with all those since the kudu deployments logs are deleted after some time. When this happens, all deployments logs are deleted, letting scm.azurewebsites.net/api/deployments totally empty.
The thing is I can't find any configuration for this like a retention policy or something. I controlled it and I saw some logs even made it for hours while others only 2 minutes, so I can't even know how much time I have to check those deploy. I would like to have those logs in a permanent way.
Right now I'm testing it in a Linux consumption plan.
Any ideas what am I missing?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,925 questions
0 comments No comments
{count} vote

3 answers

Sort by: Most helpful
  1. Eber Bezzone 16 Reputation points
    2021-08-02T11:23:30.057+00:00

    Thanks for your support. I already open a ticket and so far y fix it by adding a new app setting:
    ENABLE_KUDU_PERSISTENT_STORAGE = 1
    I let this information here in case someone else is having the same issue.

    2 people found this answer helpful.

  2. Jaliya Udagedara 2,836 Reputation points MVP Volunteer Moderator
    2021-07-26T02:26:11.567+00:00

    As far as I know, Deployment logs shouldn't get deleted unless we delete them explicitly.

    The logs are stored in the storage account, did you check the storage account? It should be inside File Shares inside your function storage account. You can also send the platform logs to different destinations if you want to.

    Create diagnostic settings to send platform logs and metrics to different destinations

    Please let us know what you find. Thanks!


  3. MayankBargali-MSFT 70,941 Reputation points Moderator
    2021-07-26T03:49:49.573+00:00

    @Eber Bezzone The KUDO logs are controlled by the fileLoggingMode property in the host.json file.
    With the debugOnly(the default option) property we will delete the file it's older than 1 day old and won't log more than 5 MB (cant be increased).
    With the Always property we will keep them always but it is not recommended especially for production apps and the suggestion would be using application insights.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.