8000 bug #36337 [4.4][MonologBridge] Fix $level type (fancyweb) · symfony/symfony@718722d · GitHub
[go: up one dir, main page]

Skip to content

Commit 718722d

Browse files
committed
bug #36337 [4.4][MonologBridge] Fix $level type (fancyweb)
This PR was merged into the 4.4 branch. Discussion ---------- [4.4][MonologBridge] Fix $level type | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | #36334 (comment) | License | MIT | Doc PR | - Commits ------- 19a8905 [4.4][MonologBridge] Fix $level type
2 parents 15edfd3 + 19a8905 commit 718722d

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