mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-05 20:57:36 +02:00
Tweak HandlerWrapper example in docblock, fixes #991
This commit is contained in:
@@ -16,14 +16,16 @@ use Monolog\Formatter\FormatterInterface;
|
|||||||
/**
|
/**
|
||||||
* This simple wrapper class can be used to extend handlers functionality.
|
* This simple wrapper class can be used to extend handlers functionality.
|
||||||
*
|
*
|
||||||
* Example: A filtering handle. Inherit from this class, override isHandling() like this
|
* Example: A custom filtering that can be applied to any handler.
|
||||||
*
|
*
|
||||||
* public function isHandling(array $record)
|
* Inherit from this class and override handle() like this:
|
||||||
|
*
|
||||||
|
* public function handle(array $record)
|
||||||
* {
|
* {
|
||||||
* if ($record meets certain conditions) {
|
* if ($record meets certain conditions) {
|
||||||
* return false;
|
* return false;
|
||||||
* }
|
* }
|
||||||
* return $this->handler->isHandling($record);
|
* return $this->handler->handle($record);
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* @author Alexey Karapetov <alexey@karapetov.com>
|
* @author Alexey Karapetov <alexey@karapetov.com>
|
||||||
|
Reference in New Issue
Block a user