• Resolved Alexandru Tapuleasa

    (@talextech)


    Hi πŸ‘‹,

    I’ve had an issue with the logs getting deleted very quickly instead of being stored for 7 days as expected so I looked into the issue and it turns out the culprit is the pm_clear_old_logs() function which when querying the databases compares the date column, log_entry_date with UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL %d DAY)).

    But log_entry_date is DATETIME, not a unix timestamp so as a result everything gets deleted everytime. Replacing UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL %d DAY)) with DATE_SUB(NOW(), INTERVAL %d DAY) fixes the issue.

    Would be amazing if you could get this fixed in the next update,

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘All logs get deleted constantly’ is closed to new replies.