8000 [4.4][MonologBridge] Fix $level type · symfony/symfony@19a8905 · GitHub
[go: up one dir, main page]

Skip to content

Commit 19a8905

Browse files
committed
[4.4][MonologBridge] Fix $level type
1 parent 15edfd3 commit 19a8905

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/Symfony/Bridge/Monolog/Handler/ElasticsearchLogstashHandler.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ class ElasticsearchLogstashHandler extends AbstractHandler
4949
private $client;
5050
private $responses;
5151

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

src/Symfony/Bridge/Monolog/Handler/ServerLogHandler.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ class ServerLogHandler extends AbstractHandler
2525
private $context;
2626
private $socket;
2727

28-
public function __construct(string $host, int $level = Logger::DEBUG, bool $bubble = true, array $context = [])
28+
/**
29+
* @param string|int $level The minimum logging level at which this handler will be triggered
30+
*/
31+
public function __construct(string $host, $level = Logger::DEBUG, bool $bubble = true, array $context = [])
2932
{
3033
parent::__construct($level, $bubble);
3134

0 commit comments

Comments
 (0)
0