Functions logs available from previous deploys?

Hello team,

We recently had an incident where we found a bug in one of our functions. We fixed and redeployed, all good.

Then, we realized we needed to investigate further, and when we went to investigate the logs from the previous incident (from before we fixed the function), we found that they were no longer available from the interface at Netlify App

Does the functions log feature reset on a commit that changes the function?

hiya daniel,

I found this in our docs:

quoting:

Logs are retained for at least 24 hours of function activity, even after a new function deployment.

do you feel pretty certain you checked for the old logs within less than 24hrs? Because if you did, then this might be a bug, but over 24 hrs this might be expected. Not sure i personally can say what “at least” means, but i might be able to find someone who knows (might take a day or two)

Hello @perry, and thanks for the response.

At the time, I believe it was logs that were less than 24 hours old, otherwise I think I wouldn’t have ‘expected’ it to be retained.

I’ll keep this in mind and will report back if something like this happens again.