From 38fea60056554e5e54f81c365592f2997f099470 Mon Sep 17 00:00:00 2001 From: Shish Date: Tue, 16 Oct 2012 22:58:24 +0100 Subject: [PATCH] handle CLI_LOG_LEVEL not being set --- core/util.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/util.inc.php b/core/util.inc.php index dfc9e40a..cbcc6aac 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -900,7 +900,8 @@ define("SCORE_LOG_NOTSET", 0); */ function log_msg(/*string*/ $section, /*int*/ $priority, /*string*/ $message, $flash=null) { send_event(new LogEvent($section, $priority, $message)); - if(is_cli() && ($priority >= CLI_LOG_LEVEL)) { + $threshold = defined("CLI_LOG_LEVEL") ? CLI_LOG_LEVEL : 0; + if(is_cli() && ($priority >= $threshold)) { print date("c")." $section: $message\n"; } if($flash === True) {