This simple wrapper class can be used to extend handlers functionality.

Example: A custom filtering that can be applied to any handler.

Inherit from this class and override handle() like this:

public function handle(array $record)
{

   if ($record meets certain conditions) {
       return false;
   }
   return $this->handler->handle($record);

}

CloneableInstantiable
ImplementsMonolog\Handler\FormattableHandlerInterface
Monolog\Handler\HandlerInterface
Monolog\Handler\ProcessableHandlerInterface
Monolog\ResettableInterface
Methods
public __construct(Monolog\Handler\HandlerInterface $handler)
public close() : void
 

{@inheritdoc}

public getFormatter() : Monolog\Formatter\FormatterInterface
 

{@inheritdoc}

public handle(array $record) : bool
 

{@inheritdoc}

public handleBatch(array $records) : void
 

{@inheritdoc}

public isHandling(array $record) : bool
 

{@inheritdoc}

public popProcessor() : callable
 

{@inheritdoc}

public pushProcessor(callable $callback) : Monolog\Handler\HandlerInterface
 

{@inheritdoc}

public reset()
public setFormatter(Monolog\Formatter\FormatterInterface $formatter) : Monolog\Handler\HandlerInterface
 

{@inheritdoc}

Properties
protected $handler
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only