51 public function handle(array $record)
53 if ($record[
'level'] < $this->level) {
57 if (!$this->initialized) {
59 register_shutdown_function(array($this,
'close'));
60 $this->initialized =
true;
63 if ($this->bufferLimit > 0 && $this->bufferSize === $this->bufferLimit) {
64 if ($this->flushOnOverflow) {
67 array_shift($this->buffer);
72 if ($this->processors) {
73 foreach ($this->processors as $processor) {
74 $record = call_user_func($processor, $record);
78 $this->buffer[] = $record;
86 if ($this->bufferSize === 0) {
90 $this->handler->handleBatch($this->buffer);
114 $this->bufferSize = 0;
115 $this->buffer = array();
Base Handler class providing the Handler structure.
Buffers all records until closing the handler and then pass them as batch.
__construct(HandlerInterface $handler, $bufferLimit=0, $level=Logger::DEBUG, $bubble=true, $flushOnOverflow=false)
clear()
Clears the buffer without flushing any messages down to the wrapped handler.
close()
{Closes the handler.This will be called automatically when the object is destroyed}
handle(array $record)
{Handles a record.All records may be passed to this method, and the handler should discard those that...
const DEBUG
Detailed debug information.
Interface that all Monolog Handlers must implement.