Skip to content
Snippets Groups Projects
Unverified Commit 6994bce9 authored by Roeland Jago Douma's avatar Roeland Jago Douma
Browse files

Loglevel is an int

parent 83eb548d
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ class TestLogger extends Log { ...@@ -41,7 +41,7 @@ class TestLogger extends Log {
//disable original constructor //disable original constructor
} }
public function log($level, string $message, array $context = array()) { public function log(int $level, string $message, array $context = array()) {
$this->level = $level; $this->level = $level;
$this->message = $message; $this->message = $message;
} }
......
...@@ -245,12 +245,12 @@ class Log implements ILogger { ...@@ -245,12 +245,12 @@ class Log implements ILogger {
/** /**
* Logs with an arbitrary level. * Logs with an arbitrary level.
* *
* @param mixed $level * @param int $level
* @param string $message * @param string $message
* @param array $context * @param array $context
* @return void * @return void
*/ */
public function log($level, string $message, array $context = []) { public function log(int $level, string $message, array $context = []) {
$minLevel = min($this->config->getValue('loglevel', Util::WARN), Util::FATAL); $minLevel = min($this->config->getValue('loglevel', Util::WARN), Util::FATAL);
$logCondition = $this->config->getValue('log.condition', []); $logCondition = $this->config->getValue('log.condition', []);
......
...@@ -120,13 +120,13 @@ interface ILogger { ...@@ -120,13 +120,13 @@ interface ILogger {
/** /**
* Logs with an arbitrary level. * Logs with an arbitrary level.
* *
* @param mixed $level * @param int $level
* @param string $message * @param string $message
* @param array $context * @param array $context
* @return mixed * @return mixed
* @since 7.0.0 * @since 7.0.0
*/ */
public function log($level, string $message, array $context = []); public function log(int $level, string $message, array $context = []);
/** /**
* Logs an exception very detailed * Logs an exception very detailed
......
...@@ -17,7 +17,7 @@ class NullLogger extends Log { ...@@ -17,7 +17,7 @@ class NullLogger extends Log {
//disable original constructor //disable original constructor
} }
public function log($level, string $message, array $context = array()) { public function log(int $level, string $message, array $context = array()) {
//noop //noop
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment