Skip to content

InfluxDB Handler for Monolog, which allows to store log messages to a InfluxDB

License

Notifications You must be signed in to change notification settings

elardvermeulen/monolog-influxdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

monolog-influxdb

InfluxDB Handler for Monolog, which allows to store log messages in InfluxDB.

Install

Via Composer

$ composer require elardvermeulen/monolog-influxdb

Usage

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

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please use the issue tracker.

Requirements

Monolog InfluxDB works with PHP 7.0 or above.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

InfluxDB Handler for Monolog, which allows to store log messages to a InfluxDB

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages