Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This module allows you to filter your watchdog messages based on severity level. It can also deduplicate the watchdog messages.
New log types will only be available to filtering after the first message has been logged using the log type.
hook_watchdog_filtering()
is also exposed by this module. Example from watchdog_filtering.api.php
:
<?php
/**
* Filter watchdog log entry. Works similar to hook_node_access().
*
* @param array $log_entry
* The watchdog log entry.
*/
function hook_watchdog_filtering(array $log_entry) {
// Never watchdog page not found messages.
if ($log_entry['type'] == 'page not found') {
return WATCHDOG_FILTERING_EXCLUDE;
}
// "Always" watchdog php messages.
if ($log_entry['type'] == 'php') {
return WATCHDOG_FILTERING_INCLUDE;
}
// Don't affect filtering on other messages.
return WATCHDOG_FILTERING_IGNORE;
}
?>
Supporting organizations:
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Maintenance fixes only
Considered feature-complete by its maintainers. - Module categories: Developer Tools
- 220 sites report using this module
- Created by gielfeldt on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
7.x-1.3
released 15 March 2017
Works with Drupal: 7.x
✓ Recommended by the project’s maintainer.
Development version: 7.x-1.x-dev updated 15 Mar 2017 at 15:23 UTC