Loglevel is an int
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
83eb548d23
commit
6994bce951
|
@ -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 {
|
||||||
/**
|
/**
|
||||||
* 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 {
|
||||||
/**
|
/**
|
||||||
* 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 {
|
||||||
//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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue