diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-04-25 15:22:28 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-04-26 10:45:52 +0200 |
commit | 38a90130ce425d531a804dff591df4a883de3154 (patch) | |
tree | d579e7442832672ab2987f9c9ecf62e79ca09a8d /lib/private/Log.php | |
parent | 12c5db90322f61d4d48e1bb534bb94382d17e317 (diff) | |
download | nextcloud-server-38a90130ce425d531a804dff591df4a883de3154.tar.gz nextcloud-server-38a90130ce425d531a804dff591df4a883de3154.zip |
move log constants to ILogger
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/private/Log.php')
-rw-r--r-- | lib/private/Log.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/private/Log.php b/lib/private/Log.php index e1f9eb213be..ffe8c665c6f 100644 --- a/lib/private/Log.php +++ b/lib/private/Log.php @@ -107,7 +107,7 @@ class Log implements ILogger { * @return void */ public function emergency(string $message, array $context = []) { - $this->log(Util::FATAL, $message, $context); + $this->log(ILogger::FATAL, $message, $context); } /** @@ -121,7 +121,7 @@ class Log implements ILogger { * @return void */ public function alert(string $message, array $context = []) { - $this->log(Util::ERROR, $message, $context); + $this->log(ILogger::ERROR, $message, $context); } /** @@ -134,7 +134,7 @@ class Log implements ILogger { * @return void */ public function critical(string $message, array $context = []) { - $this->log(Util::ERROR, $message, $context); + $this->log(ILogger::ERROR, $message, $context); } /** @@ -146,7 +146,7 @@ class Log implements ILogger { * @return void */ public function error(string $message, array $context = []) { - $this->log(Util::ERROR, $message, $context); + $this->log(ILogger::ERROR, $message, $context); } /** @@ -160,7 +160,7 @@ class Log implements ILogger { * @return void */ public function warning(string $message, array $context = []) { - $this->log(Util::WARN, $message, $context); + $this->log(ILogger::WARN, $message, $context); } /** @@ -171,7 +171,7 @@ class Log implements ILogger { * @return void */ public function notice(string $message, array $context = []) { - $this->log(Util::INFO, $message, $context); + $this->log(ILogger::INFO, $message, $context); } /** @@ -184,7 +184,7 @@ class Log implements ILogger { * @return void */ public function info(string $message, array $context = []) { - $this->log(Util::INFO, $message, $context); + $this->log(ILogger::INFO, $message, $context); } /** @@ -195,7 +195,7 @@ class Log implements ILogger { * @return void */ public function debug(string $message, array $context = []) { - $this->log(Util::DEBUG, $message, $context); + $this->log(ILogger::DEBUG, $message, $context); } @@ -260,7 +260,7 @@ class Log implements ILogger { // if log condition is satisfied change the required log level to DEBUG if ($this->logConditionSatisfied) { - return Util::DEBUG; + return ILogger::DEBUG; } if (isset($context['app'])) { @@ -274,11 +274,11 @@ class Log implements ILogger { if (!empty($logCondition) && isset($logCondition['apps']) && in_array($app, $logCondition['apps'], true)) { - return Util::DEBUG; + return ILogger::DEBUG; } } - return min($this->config->getValue('loglevel', Util::WARN), Util::FATAL); + return min($this->config->getValue('loglevel', ILogger::WARN), ILogger::FATAL); } /** @@ -291,7 +291,7 @@ class Log implements ILogger { */ public function logException(\Throwable $exception, array $context = []) { $app = $context['app'] ?? 'no app in context'; - $level = $context['level'] ?? Util::ERROR; + $level = $context['level'] ?? ILogger::ERROR; $serializer = new ExceptionSerializer(); $data = $serializer->serializeException($exception); |