monolog-publish
, (*1)
A simple Monolog handler that can be used to 'publish' the errors to a subscriber., (*2)
Publishers
Available publishers are:, (*3)
Install
Via Composer, (*4)
``` bash
$ composer require zae/monolog-publish, (*5)
## Usage
``` php
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Zae\Monolog\Publish\Handler\PublishHandler;
use Zae\Monolog\Publish\Publisher\RedisPublisher;
// create a log channel
$log = new Logger('name');
$log->pushHandler(new PublishHandler(new RedisPublisher('log', Logger::WARNING)));
// add records to the log
$log->addWarning('Foo');
$log->addError('Bar');
Testing
bash
$ phpunit, (*6)
Contributing
Contributions are welcome via pull requests on github., (*7)
Mostly new publishers are needed., (*8)
Credits
License
The MIT License (MIT). Please see License File for more information., (*9)