Watchdog Prune
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
This module will allow you to selectively delete watchdog entries based on criteria, like age.
Drupal normally only deletes watchdog entries after 1,000 to 1,000,000 entries.
Instead, you can use this module to say "Delete entries older than 2 years", for example. This allows your site to guarantee that it retains watchdog entries for a certain time, regardless of how many entries are accumulated. However, it also lets you still remove entries from the table eventually, so as not to have a watchdog table which is too large.
This module is ideal for sites where entries should be kept for a certain amount of time, and for the purpose of generating reports based on user activity, without the worry that entries might start getting deleted by Drupal before a report can be run.
Works Great With...
The Views Watchdog module. That module lets you build a View/report from watchdog entries (and you can use Views Data Export to export to CSV). THIS module ensures the watchdog table won't lose records too soon.
Installation / Configuration
After normal module installation, configure by visiting admin/config/development/watchdog-prune.
Drupal core's setting of "Database log messages to keep" must be set to "All", and will be set to that by this module.
Drupal 7 Status
At the time of this writing, the module only works based on age, and though simple, is considered "alpha" stage for the moment, so test thoroughly before using in a production site.
Drupal 8 & the road ahead
A stable version of the module is now released for Drupal 8.
