Add retention policy to logs

Created on 22 September 2025, 23 days ago

Problem/Motivation

Hello everyone,
Recently in one of our projects we had an issue where the config_log table had a huge size. The issue was not caused by the config log module but it led us to discover that the module does not have a way to delete logs in the config_log table. We had to implement such a solution so I'm leaving here the patch in case it could help anyone.

Proposed resolution

Add a solution similar to what the dblog module uses. We added a new configuration to the config page where the user can select how many logs they would want to store. Based on that we also added a cron job to delete the logs in the config_log table. Nothing was done on the logs stored on the watchdog table.

Feature request
Status

Active

Version

3.0

Component

Code

Created by

🇵🇹Portugal nsalves

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024