As noted [here](https://github.com/symfony/monolog-bundle/pull/438#issuecomment-1542839322), using [`type: elastic_search`](https://github.com/symfony/monolog-bundle/blob/master/DependencyInjection/Configuration.php#L83) for a handler does not work. We attempt to [pass the host as `host`](https://github.com/symfony/monolog-bundle/blob/master/DependencyInjection/MonologExtension.php#L294), but the [`ClientBuilder::fromConfig`](https://github.com/elastic/elasticsearch-php/blob/main/src/ClientBuilder.php#L144) from upstream expects a plural [`hosts` array](https://github.com/elastic/elasticsearch-php/blob/main/src/ClientBuilder.php#L213). This applies to both [v7 and v8](https://github.com/Seldaek/monolog/blob/main/composer.json#L23). There are no workarounds, except to install the Elastica client instead (v7 due to https://github.com/symfony/monolog-bundle/issues/499). We have no tests for `elastic_search` handlers.
Activity
fix: correct service parameters for `elastic_search` type handlers
elastic_search
type handlers #501