diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-11 12:25:28 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-13 15:52:18 +0100 |
commit | fa758668798dcd43510a2ef09c864e12c4eee21e (patch) | |
tree | 4b4aba427c476abcc84faf7dcba76addd5a29972 /lib/private/log.php | |
parent | cbe995af318e9b942b15d106a92af54cca978750 (diff) | |
download | nextcloud-server-fa758668798dcd43510a2ef09c864e12c4eee21e.tar.gz nextcloud-server-fa758668798dcd43510a2ef09c864e12c4eee21e.zip |
Fix PHPDoc
Diffstat (limited to 'lib/private/log.php')
-rw-r--r-- | lib/private/log.php | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/lib/private/log.php b/lib/private/log.php index fca3ee0882a..6c1666a9d7f 100644 --- a/lib/private/log.php +++ b/lib/private/log.php @@ -32,6 +32,7 @@ use InterfaSys\LogNormalizer\Normalizer; use \OCP\ILogger; use OCP\Security\StringUtils; +use OCP\Util; /** * logging utilities @@ -47,11 +48,13 @@ class Log implements ILogger { /** @var string */ private $logger; + /** @var SystemConfig */ private $config; /** @var boolean|null cache the result of the log condition check for the request */ private $logConditionSatisfied = null; + /** @var Normalizer */ private $normalizer; @@ -83,15 +86,15 @@ class Log implements ILogger { } - /** * System is unusable. * * @param string $message * @param array $context + * @return void */ public function emergency($message, array $context = array()) { - $this->log(\OCP\Util::FATAL, $message, $context); + $this->log(Util::FATAL, $message, $context); } /** @@ -102,9 +105,10 @@ class Log implements ILogger { * * @param string $message * @param array $context + * @return void */ public function alert($message, array $context = array()) { - $this->log(\OCP\Util::ERROR, $message, $context); + $this->log(Util::ERROR, $message, $context); } /** @@ -114,9 +118,10 @@ class Log implements ILogger { * * @param string $message * @param array $context + * @return void */ public function critical($message, array $context = array()) { - $this->log(\OCP\Util::ERROR, $message, $context); + $this->log(Util::ERROR, $message, $context); } /** @@ -125,9 +130,10 @@ class Log implements ILogger { * * @param string $message * @param array $context + * @return void */ public function error($message, array $context = array()) { - $this->log(\OCP\Util::ERROR, $message, $context); + $this->log(Util::ERROR, $message, $context); } /** @@ -138,9 +144,10 @@ class Log implements ILogger { * * @param string $message * @param array $context + * @return void */ public function warning($message, array $context = array()) { - $this->log(\OCP\Util::WARN, $message, $context); + $this->log(Util::WARN, $message, $context); } /** @@ -148,9 +155,10 @@ class Log implements ILogger { * * @param string $message * @param array $context + * @return void */ public function notice($message, array $context = array()) { - $this->log(\OCP\Util::INFO, $message, $context); + $this->log(Util::INFO, $message, $context); } /** @@ -160,9 +168,10 @@ class Log implements ILogger { * * @param string $message * @param array $context + * @return void */ public function info($message, array $context = array()) { - $this->log(\OCP\Util::INFO, $message, $context); + $this->log(Util::INFO, $message, $context); } /** @@ -170,9 +179,10 @@ class Log implements ILogger { * * @param string $message * @param array $context + * @return void */ public function debug($message, array $context = array()) { - $this->log(\OCP\Util::DEBUG, $message, $context); + $this->log(Util::DEBUG, $message, $context); } @@ -182,9 +192,10 @@ class Log implements ILogger { * @param mixed $level * @param string $message * @param array $context + * @return void */ public function log($level, $message, array $context = array()) { - $minLevel = min($this->config->getValue('loglevel', \OCP\Util::WARN), \OCP\Util::ERROR); + $minLevel = min($this->config->getValue('loglevel', Util::WARN), Util::ERROR); $logCondition = $this->config->getValue('log.condition', []); array_walk($context, [$this->normalizer, 'format']); @@ -199,7 +210,7 @@ class Log implements ILogger { if(!empty($logCondition) && isset($logCondition['apps']) && in_array($app, $logCondition['apps'], true)) { - $minLevel = \OCP\Util::DEBUG; + $minLevel = Util::DEBUG; } } else { @@ -247,7 +258,7 @@ class Log implements ILogger { // if log condition is satisfied change the required log level to DEBUG if($this->logConditionSatisfied) { - $minLevel = \OCP\Util::DEBUG; + $minLevel = Util::DEBUG; } if ($level >= $minLevel) { |