summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/log/syslog.php7
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);
+ }
}
}