handle CLI_LOG_LEVEL not being set
This commit is contained in:
parent
073b21aaa1
commit
38fea60056
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user