You are here

README.txt in Watchdog Filtering 6

Same filename and directory in other branches
  1. 7 README.txt
This module allows you to filter your watchdog messages based on severity level. It can also deduplicate the watchdog messages.

hook_watchdog_filtering() is also exposed by this module. Example from watchdog_filtering.api.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;
}

File

README.txt
View source
  1. This module allows you to filter your watchdog messages based on severity level. It can also deduplicate the watchdog messages.
  2. hook_watchdog_filtering() is also exposed by this module. Example from watchdog_filtering.api.php:
  3. /**
  4. * Filter watchdog log entry. Works similar to hook_node_access().
  5. *
  6. * @param array $log_entry
  7. * The watchdog log entry
  8. */
  9. function hook_watchdog_filtering(array $log_entry) {
  10. // Never watchdog page not found messages.
  11. if ($log_entry['type'] == 'page not found') {
  12. return WATCHDOG_FILTERING_EXCLUDE;
  13. }
  14. // "Always" watchdog php messages.
  15. if ($log_entry['type'] == 'php') {
  16. return WATCHDOG_FILTERING_INCLUDE;
  17. }
  18. // Don't affect filtering on other messages.
  19. return WATCHDOG_FILTERING_IGNORE;
  20. }