function hook_watchdog_filtering in Watchdog Filtering 7
Same name and namespace in other branches
- 6 watchdog_filtering.api.php \hook_watchdog_filtering()
Filter watchdog log entry. Works similar to hook_node_access().
Parameters
array $log_entry: The watchdog log entry.
1 invocation of hook_watchdog_filtering()
- watchdog_filtering_invoke_filtering in ./
watchdog_filtering.module - Check if a log entry may be watchdogged.
File
- ./
watchdog_filtering.api.php, line 19 - Hooks provided by the Watchdog Filtering module.
Code
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;
}