Loglevel is an int

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pull/8553/head
Roeland Jago Douma 6 years ago
parent 83eb548d23
commit 6994bce951
No known key found for this signature in database
GPG Key ID: F941078878347C0C

@ -41,7 +41,7 @@ class TestLogger extends Log {
//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->message = $message;
}

@ -245,12 +245,12 @@ class Log implements ILogger {
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param int $level
* @param string $message
* @param array $context
* @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);
$logCondition = $this->config->getValue('log.condition', []);

@ -120,13 +120,13 @@ interface ILogger {
/**
* Logs with an arbitrary level.
*
* @param mixed $level
* @param int $level
* @param string $message
* @param array $context
* @return mixed
* @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

@ -17,7 +17,7 @@ class NullLogger extends Log {
//disable original constructor
}
public function log($level, string $message, array $context = array()) {
public function log(int $level, string $message, array $context = array()) {
//noop
}
}

Loading…
Cancel
Save