elastic / elasticsearch-php

Official PHP client for Elasticsearch.
https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html
MIT License
5.26k stars 965 forks source link

Allow psr/log 2 #1154

Closed derrabus closed 3 years ago

derrabus commented 3 years ago

This PR enables this library to be used with the updated psr/log interfaces. The current code is already compatible with version 2 of the interfaces.

There's also a version 3, but unfortunately it requires a return type to be added to Elasticsearch\Common\EmptyLogger. Adding that type could break userland code that extends EmptyLogger.

elasticmachine commented 3 years ago

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

Jean85 commented 3 years ago

Ping @ezimuel: this is a blocker for https://github.com/Seldaek/monolog/pull/1564

ezimuel commented 3 years ago

Thanks @derrabus for this PR and thanks @Jean85 for the ping. I'll merge it also in 7.x and release in the upcoming 7.14.0 version.