Simple handler wrapper that filters records based on a list of levels

It can be configured with an exact list of levels to allow, or a min/max level.

CloneableInstantiable
ExtendsMonolog\Handler\Handler
ImplementsMonolog\Handler\FormattableHandlerInterface
Monolog\Handler\HandlerInterface
Monolog\Handler\ProcessableHandlerInterface
Monolog\ResettableInterface
Methods
public __construct( $handler, $minLevelOrList = 100, $maxLevel = 600, bool $bubble = true)
 
  • psalm-param HandlerInterface|callable(?array, HandlerInterface): HandlerInterface $handler
public Monolog\Handler\Handler::__destruct()
public Monolog\Handler\Handler::__sleep()
public Monolog\Handler\Handler::close() : void
 

{@inheritdoc}

public getAcceptedLevels() : array
public getFormatter() : Monolog\Formatter\FormatterInterface
 

{@inheritdoc}

public getHandler(?array $record = NULL)
 

Return the nested handler

If the handler was provided as a factory callable, this will trigger the handler's instantiation.

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}

  • suppress PhanTypeMismatchReturn
public reset()
public setAcceptedLevels( $minLevelOrList = 100, $maxLevel = 600) : self
 
    public setFormatter(Monolog\Formatter\FormatterInterface $formatter) : Monolog\Handler\HandlerInterface
     

    {@inheritdoc}

    Properties
    protected $acceptedLevels
     

    Minimum level for logs that are passed to handler

    • var int[]
    protected $bubble
     

    Whether the messages that are handled can bubble up the stack or not

    • var bool
    protected $handler
     

    Handler or factory callable($record, $this)

    protected $processors
     
    • var callable[]
    Methods
    protected processRecord(array $record) : array
     

    Processes a record.

    protected resetProcessors() : void
    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only