cron logging: always print messages of level >= LOG_WARNING

This commit is contained in:
Daniel Reichelt
2016-02-16 17:58:10 +01:00
parent ca80b6372b
commit 71248f0adf

View File

@@ -104,30 +104,30 @@ class FroxlorLogger {
return; return;
} }
if (self::$crondebug_flag) { switch($type) {
switch($type) { case LOG_INFO:
case LOG_INFO: $_type = 'information';
$_type = 'information'; break;
break; case LOG_NOTICE:
case LOG_NOTICE: $_type = 'notice';
$_type = 'notice'; break;
break; case LOG_WARNING:
case LOG_WARNING: $_type = 'warning';
$_type = 'warning'; break;
break; case LOG_ERR:
case LOG_ERR: $_type = 'error';
$_type = 'error'; break;
break; case LOG_CRIT:
case LOG_CRIT: $_type = 'critical';
$_type = 'critical'; break;
break; case LOG_DEBUG:
case LOG_DEBUG: $_type = 'debug';
$_type = 'debug'; break;
break; default:
default: $_type = 'unknown';
$_type = 'unknown'; break;
break; }
} if (self::$crondebug_flag || $type <= LOG_WARNING) { # more severe levels have smaller numbers
echo "[".$_type."] ".$text.PHP_EOL; echo "[".$_type."] ".$text.PHP_EOL;
} }