Skip to content

An MIT-licensed package to add LogDNA support to Monolog

License

Notifications You must be signed in to change notification settings

lyal/monolog-logdna

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3c2ae7c · Dec 22, 2017

History

9 Commits
Dec 22, 2017
Dec 22, 2017
Dec 22, 2017
Dec 22, 2017
Dec 22, 2017
Dec 22, 2017
Dec 22, 2017
Dec 22, 2017
Dec 22, 2017
Dec 22, 2017
Dec 22, 2017
Dec 22, 2017
Dec 22, 2017
Dec 22, 2017
Dec 22, 2017
Dec 22, 2017
Dec 22, 2017

Repository files navigation

monolog-logdna

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Install

Via Composer

$ composer require lyal/monolog-logdna

Usage

$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.

Environment Variables

You can set two environment variables for this library:

APP_ENV -- (string) the environment that the logger is running in

LOGDNA_INGESTION_KEY -- (string) the ingestion key provided in your LogDNA dasbboard

LOGDNA_HOSTNAME -- (string) the host name of the current environment

LOGDNA_HOST_IP -- (ip address) the ip address of the currrent environment

LOGDNA_API_URL -- (url) the base url for your LogDNA service

Testing

phpunit 

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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

About

An MIT-licensed package to add LogDNA support to Monolog

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages