summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/bootstrap.inc4
-rw-r--r--includes/common.inc19
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'),
+ );
+}