forked from Wavyzz/dolibarr
Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0
This commit is contained in:
@@ -1818,8 +1818,10 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename =
|
||||
if (!empty($message)) {
|
||||
// Test log level
|
||||
$logLevels = array(LOG_EMERG=>'EMERG', LOG_ALERT=>'ALERT', LOG_CRIT=>'CRITICAL', LOG_ERR=>'ERR', LOG_WARNING=>'WARN', LOG_NOTICE=>'NOTICE', LOG_INFO=>'INFO', LOG_DEBUG=>'DEBUG');
|
||||
|
||||
if (!array_key_exists($level, $logLevels)) {
|
||||
throw new Exception('Incorrect log level');
|
||||
dol_syslog('Error Bad Log Level '.$level, LOG_ERR);
|
||||
$level = $logLevels[LOG_ERR];
|
||||
}
|
||||
if ($level > getDolGlobalInt('SYSLOG_LEVEL')) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user