diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-04-30 11:12:35 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-04-30 11:12:35 +0000 |
commit | 38d22252b9fee97e0b1ef8e8dedb3feea77d27f8 (patch) | |
tree | b0e07b2d2ab8725d1388fdd76dc26111ad2d911b /includes | |
parent | dad5275365da534d4d753c9c89e08346b963bf34 (diff) | |
download | brdo-38d22252b9fee97e0b1ef8e8dedb3feea77d27f8.tar.gz brdo-38d22252b9fee97e0b1ef8e8dedb3feea77d27f8.tar.bz2 |
- Patch #67893 by kbahey, dww, alienbrain, asimmonds et al: made it possible to filter log messages in the database log.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/bootstrap.inc | 4 | ||||
-rw-r--r-- | includes/common.inc | 19 |
2 files changed, 23 insertions, 0 deletions
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'), + ); +} |