mumsnet / mn-monolog
Custom handlers for Monolog
Installs: 5 650
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 8
Forks: 0
Open Issues: 0
Requires
- php: ^7.3
- monolog/monolog: ^2.0
Requires (Dev)
- jakub-onderka/php-parallel-lint: ^0.9
- phpunit/phpunit: ^7.5
README
Custom handlers for Monolog
How to use with Lumen
Add this to your composer.json
file in the require
section:
"mumsnet/mn-monolog": "^1.0"
Run composer to update the packages:
docker run -it -v `pwd`:/var/www/html mumsnet/php-fpm-lumen:7.3 composer install
Add this to your bootstrap/app.php
file:
if (getenv('PAPERTRAIL_HOSTNAME') !== FALSE) { $app->configureMonologUsing(function ($monolog) { $papertrailHandler = new PapertrailHandler( getenv('PAPERTRAIL_HOSTNAME'), getenv('PAPERTRAIL_PORT'), getenv('SITE_HOSTNAME'), getenv('PAPERTRAIL_PROGRAM_NAME')); $monolog->pushHandler($papertrailHandler); return $monolog; }); }