diff options
author | Andreas Fischer <bantu@owncloud.com> | 2013-08-04 02:48:00 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@owncloud.com> | 2013-08-04 02:48:00 +0200 |
commit | e03d9e3aa07300aaee5ccad0d8e2b5352d107aee (patch) | |
tree | 6b2c79ad873bcfd359d4a896c340c78f9ef22f1c | |
parent | 3534c3b3735242afa5c991417027a8c8e41e6465 (diff) | |
download | nextcloud-server-e03d9e3aa07300aaee5ccad0d8e2b5352d107aee.tar.gz nextcloud-server-e03d9e3aa07300aaee5ccad0d8e2b5352d107aee.zip |
Port log level filtering from OC_Log_Owncloud to OC_Log_Syslog.
-rw-r--r-- | lib/log/syslog.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/log/syslog.php b/lib/log/syslog.php index d1fb28d8b0a..a28255ed10e 100644 --- a/lib/log/syslog.php +++ b/lib/log/syslog.php @@ -31,7 +31,10 @@ class OC_Log_Syslog { * @param int level */ public static function write($app, $message, $level) { - $syslog_level = self::$levels[$level]; - syslog($syslog_level, '{'.$app.'} '.$message); + $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); + } } } |