$level
$level :
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.
$formatter : \Monolog\Formatter\FormatterInterface
__construct(callback|\Monolog\Handler\HandlerInterface $handler, integer $actionLevel = \Monolog\Logger::WARNING, integer $bufferSize, Boolean $bubble = true, Boolean $stopBuffering = true)
callback|\Monolog\Handler\HandlerInterface | $handler | Handler or factory callback($record, $fingersCrossedHandler). |
integer | $actionLevel | The minimum logging level at which this handler will be triggered |
integer | $bufferSize | How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. |
Boolean | $bubble | Whether the messages that are handled can bubble up the stack or not |
Boolean | $stopBuffering | Whether the handler should stop buffering after being triggered (default true) |
setFormatter(\Monolog\Formatter\FormatterInterface $formatter)
Sets the formatter.
\Monolog\Formatter\FormatterInterface | $formatter |
getFormatter() : \Monolog\Formatter\FormatterInterface
Gets the formatter.
getDefaultFormatter() : \Monolog\Formatter\FormatterInterface
Gets the default formatter.
Loading…