Skip to content
A Monolog handler and formatter that makes use of the official Elasticsearch PHP client
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/Atrapalo/Monolog
tests/Atrapalo/Test/Monolog
.editorconfig
.gitignore
.scrutinizer.yml
.travis.yml
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
composer.json
phpunit.xml.dist

README.md

Monolog Elasticsearch handler and formatter

This extremely simple library provide of an elasticsearch handler and formatter which makes use of the official PHP Elasticsearch client.

Build Status Scrutinizer Code Quality

Usage

<?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'])
);

Installation

This library can be installed through composer

composer require atrapalo/monolog-elasticsearch

Requirements

In order to make use of this library you will need

  • Monolog
  • An elasticsearch instance

Contributing

See CONTRIBUTING file.

Running the Tests

php bin/phpunit

Credits

Contributor Code of Conduct

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.

License

Monolog-Elasticsearch handler is released under the MIT License. See the bundled LICENSE file for details.

You can’t perform that action at this time.