Add a cleanup function

Created on 23 May 2025, 16 days ago

Problem/Motivation

The module currently puts no limit on the number of log entries in the system. This may lead to a very large logging table. I have a project where the table for this module is a little over 6GB.

Steps to reproduce

* Enable the module
* Generate a lot of entity operations (sorry, not quite sure how one would do this)

Proposed resolution

Implement a configuration option and a hook_cron implementation to purge log entries older than a certain age. Offer the following options:

  • Never purge (default for existing installations, in order to not introduce new behaviour)
  • 1 year
  • 180 days
  • 90 days (default for new installations)
  • 30 days
  • 2 weeks
  • 1 week
  • 1 day

Remaining tasks

  • Create MR
  • Review
  • Merge

User interface changes

There will be a new configuration option at /admin/config/system/entity_logger

API changes

None.

Data model changes

None.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇳🇱Netherlands eelkeblok Netherlands 🇳🇱

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

Comments & Activities

Production build 0.71.5 2024