This extremely simple library provide of an elasticsearch handler and formatter which makes use of the official PHP Elasticsearch client.
<?php
use Atrapalo\Monolog\Handler\ElasticsearchHandler;
use Elasticsearch\ClientBuilder;
use Monolog\Logger;
$logger = new Logger('application');
$logger->pushHandler(
new ElasticsearchHanler($client, ['index' => 'logs', 'type' => 'log'])
);
This library can be installed through composer
composer require atrapalo/monolog-elasticsearch
In order to make use of this library you will need
- Monolog
- An elasticsearch instance
See CONTRIBUTING file.
php bin/phpunit
- Christian Soronellas christian.soronellas@atrapalo.com
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See CODE_OF_CONDUCT.md file.
Monolog-Elasticsearch handler is released under the MIT License. See the bundled LICENSE file for details.