Problem/Motivation
Logs are not cleaned so table size became too large,
Steps to reproduce
Check many fields to be logged for change and see the table size.
Proposed resolution
Provide config to clean old logs periodically on cron run.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | entity_log-3172389-9-dev.patch | 4.68 KB | missvengerberg |
| #9 | entity_log-3172389-9-v1.4.patch | 4.68 KB | missvengerberg |
| #6 | entity_log-3172389-6.patch | 3.13 KB | igor.barato |
Issue fork entity_log-3172389
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mhmd commentedComment #3
mhmd commentedPatch for the feature
Comment #4
davit.magaldadze commentedModified the patch to use
entity_type.bundle.infoservice to load bundle info and fix aexcutetype in the cron hook.Comment #5
igor.barato commentedI updated the patch to remove entity_log.routing.yml permission fix in favor of this separate issue #3085171
Comment #6
igor.barato commentedUpdated delete query to work with updated entity columns.
Comment #7
jcnventuraThe code in hook_cron() should be moved to the new cleanLogs() method, so that the entirety of the hook_cron is:
Also, it should use PDO methods to create the delete query and not raw SQL that will probably not work on non-SQL Drupal sites.
Comment #8
jcnventuraComment #9
missvengerberg commentedMade a patch to delete rows from entity_log table based only on limit of rows, instead of bundles.
Comment #12
milosr commentedComment #14
jcnventura