[5.0][MonologBridge] Fix $level type
This commit is contained in:
parent
e1a522b470
commit
d9c06814f9
@ -26,11 +26,14 @@ class NotifierHandler extends AbstractHandler
|
||||
{
|
||||
private $notifier;
|
||||
|
||||
public function __construct(NotifierInterface $notifier, int $level = Logger::ERROR, bool $bubble = true)
|
||||
/**
|
||||
* @param string|int $level The minimum logging level at which this handler will be triggered
|
||||
*/
|
||||
public function __construct(NotifierInterface $notifier, $level = Logger::ERROR, bool $bubble = true)
|
||||
{
|
||||
$this->notifier = $notifier;
|
||||
|
||||
parent::__construct($level < Logger::ERROR ? Logger::ERROR : $level, $bubble);
|
||||
parent::__construct(Logger::toMonologLevel($level) < Logger::ERROR ? Logger::ERROR : $level, $bubble);
|
||||
}
|
||||
|
||||
public function handle(array $record): bool
|
||||
|
@ -54,7 +54,10 @@ trait ServerLogHandlerTrait
|
||||
private $context;
|
||||
private $socket;
|
||||
|
||||
public function __construct(string $host, int $level = Logger::DEBUG, bool $bubble = true, array $context = [])
|
||||
/**
|
||||
* @param string|int $level The minimum logging level at which this handler will be triggered
|
||||
*/
|
||||
public function __construct(string $host, $level = Logger::DEBUG, bool $bubble = true, array $context = [])
|
||||
{
|
||||
parent::__construct($level, $bubble);
|
||||
|
||||
|
Reference in New Issue
Block a user