Skip to content

Commit f78fcaf

Browse files
committed
bug symfony#501 fix: correct service parameters for elastic_search type handlers (Kenneth-Sills)
This PR was merged into the 3.x branch. Discussion ---------- fix: correct service parameters for `elastic_search` type handlers Closes symfony#500 Commits ------- cae1fb8 fix: correct service parameters for `elastic_search` type handlers
2 parents 8caf809 + cae1fb8 commit f78fcaf

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
@@ -304,7 +304,7 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler
304304
$factory = class_exists('Elastic\Elasticsearch\ClientBuilder') ? 'Elastic\Elasticsearch\ClientBuilder' : 'Elasticsearch\ClientBuilder';
305305
$client->setFactory([$factory, 'fromConfig']);
306306
$clientArguments = [
307-
'host' => $handler['elasticsearch']['host'],
307+
'hosts' => [$handler['elasticsearch']['host']],
308308
];
309309

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

0 commit comments

Comments
 (0)