Port log level filtering from OC_Log_Owncloud to OC_Log_Syslog.
This commit is contained in:
parent
3534c3b373
commit
e03d9e3aa0
|
@ -31,7 +31,10 @@ class OC_Log_Syslog {
|
|||
* @param int level
|
||||
*/
|
||||
public static function write($app, $message, $level) {
|
||||
$minLevel = min(OC_Config::getValue("loglevel", OC_Log::WARN), OC_Log::ERROR);
|
||||
if ($level >= $minLevel) {
|
||||
$syslog_level = self::$levels[$level];
|
||||
syslog($syslog_level, '{'.$app.'} '.$message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue