Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

DBLog Retention Policy

No security coverage Under active development 15 sites

This module allows you to manage how long log messages are stored in your Drupal site. You can set specific rules for different types of logs, like keeping certain records for a set number of months or days, and also set a default rule for all other logs. This provides more control over log retention than the core database logging feature.

DBLog Retention Policy provides the ability to control retention of log messages at a much more granular level than core. You can set any logging channel (type) or group of channels in the dblog to keep a specified number of log messages or keep by date.

For example keep node change records for 6 months and other logs for 1 month.

A default policy can and should be configured for all non-specified types.

Requirements

This module requires Drupal core >= 9.0 with the core dblog module installed.

Installation

Install as you would normally install a contributed Drupal module. For further information, see Installing Drupal Modules.

Configuration

  • Enable the module through UI or Drush.
  • Navigate to /admin/config/development/logging/retention_policy to configure retention policies.
  • Create a "Default" policy by selecting Default in the list of Log Types - this applies to all log types as a group that don't have a specific policy.
  • Create as many specific policies as required to meet your logging preferences/needs.

Policies that have apply to multiple log types apply to them in aggregate - so if keeping a certain number of log messages that may not be the desired effect. Also, when limiting log messages by both date and time, it is the greater of those values that is effectively used.

Ask your assistant about DBLog Retention Policy

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Sep 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core PHP Release date
1.0.0-beta1 Pre-release 9–10 Sep 4, 2023
1.x-dev Dev 9–10 Sep 4, 2023