πΊπΈUnited States chadedge
Hey bud, here's what I did.
1. In `parameters` section of services.yml:
monolog.channel_handlers:
default:
handlers:
- name: 'elasticsearch'
formatter: 'elasticsearch'
- name: 'rotating_file'
(Yes, that means I'm routing to Elasticsearch _and_ a local rotating file - this is my local environment so I wanted some double-coverage as I played with log levels)
2. In `services` section of services.yml:
services:
monolog.handler.elasticsearch:
class: Monolog\Handler\ElasticaHandler
arguments: ['@elastica.client', {'index': 'brandname_local'}, '%monolog.level.notice%']
elastica.client:
class: Elastica\Client
arguments: ['http://elasticsearch:9200']
# arguments: ['https://vpc-test-logging-an_aws_instance_name_here_for_testing_remote_logging:443']
(I have a commented out argument for the hostname with port so I can swap from logging to a local instance of ES vs an AWS instance)
I think the thing missing from your comment was the `elastica.client` that your handler needed to reference. I tried with the elasticsearch.client but that needed an additional `resolver` and boyo that went down a failure rabbit-hole.
πΊπΈUnited States chadedge
chadedge β created an issue.