Skip to content

Commit cb785de

Browse files
committed
Merge branch '3.x' into 4.x
* 3.x: fix: correct service parameters for `elastic_search` type handlers
2 parents a61749b + f78fcaf commit cb785de

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Add TelegramBotHandler `topic` support
1414
* Deprecate `sentry` and `raven` handler, use a `service` handler with [`sentry/sentry-symfony`](https://docs.sentry.io/platforms/php/guides/symfony/logs/) instead
1515
* Add configuration for Gelf encoders
16+
* Fix `host` configuration for `elastic_search` handler
1617

1718
## 3.10.0 (2023-11-06)
1819

src/DependencyInjection/MonologExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ private function buildHandler(ContainerBuilder $container, string $name, array $
265265
$factory = class_exists('Elastic\Elasticsearch\ClientBuilder') ? 'Elastic\Elasticsearch\ClientBuilder' : 'Elasticsearch\ClientBuilder';
266266
$client->setFactory([$factory, 'fromConfig']);
267267
$clientArguments = [
268-
'host' => $handler['elasticsearch']['host'],
268+
'hosts' => [$handler['elasticsearch']['host']],
269269
];
270270

271271
if (isset($handler['elasticsearch']['user'], $handler['elasticsearch']['password'])) {

0 commit comments

Comments
 (0)