Function Logs Getting Wiped, Don't Know Why

A lot of the time, the logs for my functions will disappear or be reset to “You don’t have any logs”, and I’m not sure why this is happening.

Could you tell me exactly what actions are supposed to cause log deletions? At the moment I can’t tell whether the logs aren’t functioning properly or I’m doing something wrong.

For example, I have a function called dayCounter which increments daysSubscribed fields in two tables.

I have four scheduled functions, dayCounterEastern, dayCounterCentral, dayCounterMountain, and dayCounterPacific, which run at 8 am in the specified timezone and invoke dayCounter.

Every time that one of these four functions run, the logs for dayCounter only display the logs from that specific invocation. EX:
300c723a-cbab-479a-ba99-f907a281408f [START] Version: $LATEST
300c723a-cbab-479a-ba99-f907a281408f [INFO] Datetime: 6/11/2021, 11:00:19 AM
Invoke function [dayCounter]
300c723a-cbab-479a-ba99-f907a281408f [INFO] Datetime: 6/11/2021, 11:00:20 AM
subscriberUpdateByFilter: { items: [] } } [] },
300c723a-cbab-479a-ba99-f907a281408f [INFO] Datetime: 6/11/2021, 11:00:20 AM
{ completed: false, result: null, error: null }
300c723a-cbab-479a-ba99-f907a281408f [INFO] Datetime: 6/11/2021, 11:00:20 AM
Function [dayCounter] completed
300c723a-cbab-479a-ba99-f907a281408f [END]
300c723a-cbab-479a-ba99-f907a281408f [REPORT] Duration: 377.73 ms Billed
Duration: 378 ms Memory Size: 1536 MB Max Memory Used: 95 MB

When dayCounter was invoked at 10AM, it only displayed the 10AM logs, and so on for 9AM and 8AM. Running 8base logs in my terminal produces the same result.

Hello!

If I get you right, you can’t see your scheduled dayCounter functions logs some time after invoke, is that the problem?
Do you use “Real Time Logs”?

Lada Kokotova | Technical Support Engineer

So I have four scheduled functions that each invoke dayCounter.

When dayCounter is invoked at 8 AM, I can see the logs for that invocation.
When dayCounter is next invoked, at 9 AM, I can see the logs for the 9 AM invocation, but the logs from 8 AM are gone.
Same thing at 10 AM and 11 AM, I can only see the logs for one invocation at a time, and the logs from previous invocations seem to be deleted.

Does Real Time Logs delete old logs? I just thought it meant that it would actively look for new logs.

Hello!

Unfortunately, we provide logs for the last hour.

Lada Kokotova | Technical Support Engineer

As in all logs get wiped an hour after they are generated?

Yes, you’re right

Lada Kokotova | Technical Support Engineer