monolog-logdna
![Software License][ico-license]
![Coverage Status][ico-scrutinizer]
![Total Downloads][ico-downloads], (*1)
Install
Via Composer, (*2)
``` bash
$ composer require lyal/monolog-logdna, (*3)
## Usage
``` php
$logger = new Logger('general');
$logdnaHandler = new LogDNAHandler('YOUR_API_KEY'); // Can also be passed by env
$logger->pushHandler($logdnaHandler);
$logger->debug('this is my message!');
Notes
Unlike other monolog implementations of json-based log providers, this currently defaults to one request rather than retrying on failure;
this will result in a faster request lifecycle and will prevent accidental failure ddosing of LogDNA., (*4)
Environment Variables
You can set two environment variables for this library:, (*5)
APP_ENV -- (string) the environment that the logger is running in, (*6)
LOGDNA_INGESTION_KEY -- (string) the ingestion key provided in your LogDNA dasbboard, (*7)
LOGDNA_HOSTNAME -- (string) the host name of the current environment, (*8)
LOGDNA_HOST_IP -- (ip address) the ip address of the currrent environment, (*9)
LOGDNA_API_URL -- (url) the base url for your LogDNA service, (*10)
Testing
bash
phpunit
, (*11)
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details., (*12)
Security
If you discover any security related issues, please email lyal@pullrequest.com instead of using the issue tracker., (*13)
Credits
License
The MIT License (MIT). Please see License File for more information., (*14)