[4.4][MonologBridge] Fix $level type

This commit is contained in:
Thomas Calvet 2020-04-03 16:53:29 +02:00
parent 15edfd39d4
commit 19a8905d32
2 changed files with 8 additions and 2 deletions

View File

@ -49,7 +49,10 @@ class ElasticsearchLogstashHandler extends AbstractHandler
private $client;
private $responses;
public function __construct(string $endpoint = 'http://127.0.0.1:9200', string $index = 'monolog', HttpClientInterface $client = null, int $level = Logger::DEBUG, bool $bubble = true)
/**
* @param string|int $level The minimum logging level at which this handler will be triggered
*/
public function __construct(string $endpoint = 'http://127.0.0.1:9200', string $index = 'monolog', HttpClientInterface $client = null, $level = Logger::DEBUG, bool $bubble = true)
{
if (!interface_exists(HttpClientInterface::class)) {
throw new \LogicException(sprintf('The "%s" handler needs an HTTP client. Try running "composer require symfony/http-client".', __CLASS__));

View File

@ -25,7 +25,10 @@ class ServerLogHandler extends AbstractHandler
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);