From 38d22252b9fee97e0b1ef8e8dedb3feea77d27f8 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 30 Apr 2007 11:12:35 +0000 Subject: - Patch #67893 by kbahey, dww, alienbrain, asimmonds et al: made it possible to filter log messages in the database log. --- includes/bootstrap.inc | 4 ++++ includes/common.inc | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) (limited to 'includes') diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 4d3e8f8e7..299ba7552 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -37,6 +37,8 @@ define('CACHE_AGGRESSIVE', 2); /** * * Severity levels, as defined in RFC 3164 http://www.faqs.org/rfcs/rfc3164.html + * @see watchdog + * @see watchdog_severity_levels */ define('WATCHDOG_EMERG', 0); // Emergency: system is unusable define('WATCHDOG_ALERT', 1); // Alert: action must be taken immediately @@ -657,6 +659,8 @@ function request_uri() { * The severity of the message, as per RFC 3164 * @param $link * A link to associate with the message. + * + * @see watchdog_severity_levels */ function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL) { global $user, $base_root; diff --git a/includes/common.inc b/includes/common.inc index ea1a21a17..0a4bf3902 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -2616,3 +2616,22 @@ function drupal_parse_info_file($filename) { return $info; } + +/** + * @return + * Array of the possible severity levels for log messages. + * + * @see watchdog + */ +function watchdog_severity_levels() { + return array( + WATCHDOG_EMERG => t('emergency'), + WATCHDOG_ALERT => t('alert'), + WATCHDOG_CRITICAL => t('critical'), + WATCHDOG_ERROR => t('error'), + WATCHDOG_WARNING => t('warning'), + WATCHDOG_NOTICE => t('notice'), + WATCHDOG_INFO => t('info'), + WATCHDOG_DEBUG => t('debug'), + ); +} -- cgit v1.2.3