ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Buffers all records until a certain level is reached. More...
Public Member Functions | ||||
__construct ($handler, $activationStrategy=null, $bufferSize=0, $bubble=true, $stopBuffering=true, $passthruLevel=null) | ||||
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.
| ||||
activate () | ||||
Manually activate this logger regardless of the activation strategy. More... | ||||
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.
| ||||
close () | ||||
{} More... | ||||
reset () | ||||
clear () | ||||
Clears the buffer without flushing any messages down to the wrapped handler. More... | ||||
Public Member Functions inherited from Monolog\Handler\AbstractHandler | ||||
__construct ($level=Logger::DEBUG, $bubble=true) | ||||
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.
| ||||
handleBatch (array $records) | ||||
{Handles a set of records at once.
| ||||
close () | ||||
Closes the handler. More... | ||||
pushProcessor ($callback) | ||||
{Adds a processor in the stack.
| ||||
popProcessor () | ||||
{Removes the processor on top of the stack and returns it.
| ||||
setFormatter (FormatterInterface $formatter) | ||||
{Sets the formatter.
| ||||
getFormatter () | ||||
{Gets the formatter.
| ||||
setLevel ($level) | ||||
Sets minimum logging level at which this handler will be triggered. More... | ||||
getLevel () | ||||
Gets minimum logging level at which this handler will be triggered. More... | ||||
setBubble ($bubble) | ||||
Sets the bubbling behavior. More... | ||||
getBubble () | ||||
Gets the bubbling behavior. More... | ||||
__destruct () | ||||
reset () | ||||
Protected Attributes | |
$handler | |
$activationStrategy | |
$buffering = true | |
$bufferSize | |
$buffer = array() | |
$stopBuffering | |
$passthruLevel | |
Protected Attributes inherited from Monolog\Handler\AbstractHandler | |
$level = Logger::DEBUG | |
$bubble = true | |
$formatter | |
$processors = array() | |
Private Member Functions | |
flushBuffer () | |
Resets the state of the handler. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Monolog\Handler\AbstractHandler | |
getDefaultFormatter () | |
Gets the default formatter. More... | |
Buffers all records until a certain level is reached.
The advantage of this approach is that you don't get any clutter in your log files. Only requests which actually trigger an error (or whatever your actionLevel is) will be in the logs, but they will contain all records, not only those above the level threshold.
You can find the various activation strategies in the Monolog\ namespace.
Definition at line 31 of file FingersCrossedHandler.php.
Monolog\Handler\FingersCrossedHandler::__construct | ( | $handler, | |
$activationStrategy = null , |
|||
$bufferSize = 0 , |
|||
$bubble = true , |
|||
$stopBuffering = true , |
|||
$passthruLevel = null |
|||
) |
callable | HandlerInterface | $handler | Handler or factory callable($record, $fingersCrossedHandler). |
int | ActivationStrategyInterface | $activationStrategy | Strategy which determines when this handler takes action |
int | $bufferSize | How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. |
bool | $bubble | Whether the messages that are handled can bubble up the stack or not |
bool | $stopBuffering | Whether the handler should stop buffering after being triggered (default true) |
int | $passthruLevel | Minimum level to always flush to handler on close, even if strategy not triggered |
Definition at line 49 of file FingersCrossedHandler.php.
References Monolog\Handler\FingersCrossedHandler\$activationStrategy, Monolog\Handler\AbstractHandler\$bubble, Monolog\Handler\FingersCrossedHandler\$bufferSize, Monolog\Handler\FingersCrossedHandler\$handler, Monolog\Handler\FingersCrossedHandler\$passthruLevel, Monolog\Handler\FingersCrossedHandler\$stopBuffering, Monolog\Logger\toMonologLevel(), and Monolog\Logger\WARNING.
Monolog\Handler\FingersCrossedHandler::activate | ( | ) |
Manually activate this logger regardless of the activation strategy.
Definition at line 86 of file FingersCrossedHandler.php.
Referenced by Monolog\Handler\FingersCrossedHandler\handle().
Monolog\Handler\FingersCrossedHandler::clear | ( | ) |
Clears the buffer without flushing any messages down to the wrapped handler.
It also resets the handler to its initial buffering state.
Definition at line 153 of file FingersCrossedHandler.php.
References Monolog\Handler\FingersCrossedHandler\reset().
Monolog\Handler\FingersCrossedHandler::close | ( | ) |
{}
Definition at line 132 of file FingersCrossedHandler.php.
References Monolog\Handler\FingersCrossedHandler\flushBuffer().
|
private |
Resets the state of the handler.
Stops forwarding records to the wrapped handler.
Definition at line 162 of file FingersCrossedHandler.php.
References Monolog\Handler\AbstractHandler\$level, and Monolog\Handler\FingersCrossedHandler\$passthruLevel.
Referenced by Monolog\Handler\FingersCrossedHandler\close(), and Monolog\Handler\FingersCrossedHandler\reset().
Monolog\Handler\FingersCrossedHandler::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.
array | $record | The record to handle |
Implements Monolog\Handler\HandlerInterface.
Definition at line 106 of file FingersCrossedHandler.php.
References Monolog\Handler\AbstractHandler\$bubble, and Monolog\Handler\FingersCrossedHandler\activate().
Monolog\Handler\FingersCrossedHandler::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.
array | $record | Partial log record containing only a level key |
Implements Monolog\Handler\HandlerInterface.
Definition at line 78 of file FingersCrossedHandler.php.
Monolog\Handler\FingersCrossedHandler::reset | ( | ) |
Implements Monolog\ResettableInterface.
Definition at line 137 of file FingersCrossedHandler.php.
References Monolog\Handler\FingersCrossedHandler\flushBuffer().
Referenced by Monolog\Handler\FingersCrossedHandler\clear().
|
protected |
Definition at line 34 of file FingersCrossedHandler.php.
Referenced by Monolog\Handler\FingersCrossedHandler\__construct().
|
protected |
Definition at line 37 of file FingersCrossedHandler.php.
|
protected |
Definition at line 35 of file FingersCrossedHandler.php.
|
protected |
Definition at line 36 of file FingersCrossedHandler.php.
Referenced by Monolog\Handler\FingersCrossedHandler\__construct().
|
protected |
Definition at line 33 of file FingersCrossedHandler.php.
Referenced by Monolog\Handler\FingersCrossedHandler\__construct().
|
protected |
Definition at line 39 of file FingersCrossedHandler.php.
Referenced by Monolog\Handler\FingersCrossedHandler\__construct(), and Monolog\Handler\FingersCrossedHandler\flushBuffer().
|
protected |
Definition at line 38 of file FingersCrossedHandler.php.
Referenced by Monolog\Handler\FingersCrossedHandler\__construct().