ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5
Monolog\Handler\HandlerInterface Interface Reference

Interface that all Monolog Handlers must implement. More...

+ Inheritance diagram for Monolog\Handler\HandlerInterface:
+ Collaboration diagram for Monolog\Handler\HandlerInterface:

Public Member Functions

 isHandling (array $record)
 Checks whether the given record will be handled by this handler. More...
 
 handle (array $record)
 Handles a record. More...
 
 handleBatch (array $records)
 Handles a set of records at once. More...
 
 pushProcessor ($callback)
 Adds a processor in the stack. More...
 
 popProcessor ()
 Removes the processor on top of the stack and returns it. More...
 
 setFormatter (FormatterInterface $formatter)
 Sets the formatter. More...
 
 getFormatter ()
 Gets the formatter. More...
 

Detailed Description

Interface that all Monolog Handlers must implement.

Author
Jordi Boggiano j.bog.nosp@m.gian.nosp@m.o@sel.nosp@m.d.be

Definition at line 21 of file HandlerInterface.php.

Member Function Documentation

◆ getFormatter()

Monolog\Handler\HandlerInterface::getFormatter ( )

Gets the formatter.

Returns
FormatterInterface

Implemented in Monolog\Handler\AbstractHandler.

◆ handle()

Monolog\Handler\HandlerInterface::handle ( array  $record)

Handles a record.

All records may be passed to this method, and the handler should discard those that it does not want to handle.

The return value of this function controls the bubbling process of the handler stack. Unless the bubbling is interrupted (by returning true), the Logger class will keep on calling further handlers in the stack with a given log record.

Parameters
array$recordThe record to handle
Returns
Boolean true means that this handler handled the record, and that bubbling is not permitted. false means the record was either not processed or that this handler allows bubbling.

Implemented in Monolog\Handler\PHPConsoleHandler, Monolog\Handler\ExceptionTestHandler, Monolog\Handler\FilterHandler, Monolog\Handler\FingersCrossedHandler, Monolog\Handler\SamplingHandler, Monolog\Handler\GroupHandler, Monolog\Handler\BufferHandler, Monolog\Handler\PsrHandler, Monolog\Handler\NullHandler, Monolog\Handler\AbstractProcessingHandler, and Monolog\Handler\WhatFailureGroupHandler.

Referenced by Monolog\Handler\AbstractHandler\handleBatch().

+ Here is the caller graph for this function:

◆ handleBatch()

Monolog\Handler\HandlerInterface::handleBatch ( array  $records)

◆ isHandling()

Monolog\Handler\HandlerInterface::isHandling ( array  $record)

Checks whether the given record will be handled by this handler.

This is mostly done for performance reasons, to avoid calling processors for nothing.

Handlers should still check the record levels within handle(), returning false in isHandling() is no guarantee that handle() will not be called, and isHandling() might not be called for a given record.

Parameters
array$recordPartial log record containing only a level key
Returns
Boolean

Implemented in Monolog\Handler\FilterHandler, Monolog\Handler\FingersCrossedHandler, Monolog\Handler\SamplingHandler, Monolog\Handler\AbstractHandler, and Monolog\Handler\GroupHandler.

◆ popProcessor()

Monolog\Handler\HandlerInterface::popProcessor ( )

Removes the processor on top of the stack and returns it.

Returns
callable

Implemented in Monolog\Handler\AbstractHandler.

◆ pushProcessor()

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

Adds a processor in the stack.

Parameters
callable$callback
Returns
self

Implemented in Monolog\Handler\AbstractHandler.

◆ setFormatter()

Monolog\Handler\HandlerInterface::setFormatter ( FormatterInterface  $formatter)

Sets the formatter.

Parameters
FormatterInterface$formatter
Returns
self

Implemented in Monolog\Handler\AbstractHandler, Monolog\Handler\ElasticSearchHandler, and Monolog\Handler\FlowdockHandler.


The documentation for this interface was generated from the following file: