InfluxDB Handler for Monolog, which allows to store log messages in InfluxDB.
Via Composer
$ composer require elardvermeulen/monolog-influxdb
<?php
use InfluxDBHandler\InfluxDBHandler;
$influxDBHandler = new InfluxDBHandler('username','password','influxdb','hostname', '8086','dbname', \Monolog\Logger::DEBUG);
//Create logger
$logger = new \Monolog\Logger('channel');
$logger->pushHandler($influxDBHandler);
// example on how to create a info log
$logger->info("User succesfully logged in.", array('username' => 'Peter Doe', 'userid' => 89));
// example on how to create a info log
$logger->warning("Failed login attempt.", array('username' => 'Peter Doe'));
// example on how to create a info log
$logger->error("Oops, something went horribly wrong.", array('username' => 'John Doe', 'userid' => 90));
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please use the issue tracker.
Monolog InfluxDB works with PHP 7.0 or above.
- Elard Vermeulen https://github.com/elardvermeulen
- All Contributors https://github.com/elardvermeulen/monolog-influxdb/contributors
The MIT License (MIT). Please see License File for more information.