Collision between ElasticSearchHandler and ElasticaHandler
javijavo opened this issue · comments
Hi,
I'm trying to set up monolog-bundle with native Elasticsearch cliente (introduced in monolog 2.0).
But it seems that I'm doing something wrong and I can't make it work.
Reviewing the code itself I've seen the following lines in MonologExtension:
monolog-bundle/DependencyInjection/MonologExtension.php
Lines 983 to 1011 in fde12fc
There you can see that "elasticsearch" is always replaced with the ElasticaHandler in the array merge on line 1006.
Apart from that, I think the elastic handler should be ElasticsearchHandler, not ElasticSearchHandler (note te captial "S").
I locally did those changes but couldn't make it work and I'm lost.
Does symfony/monolog-bundle support the native Elasticsearch client? Or am I doing something wrong?
Many many thanks for your help
Yeah the problem is ElasticSearchHandler was renamed to ElasticaHandler in monolog 2.0, and Elasticsearch was added at the same time. But here it was using elasticsearch and kept using elasticsearch for elastica.. now we're kinda in a mess.
#438 should help resolve this/move things forward, then eventually we can drop the elasticsearch type.