$level
$level :
Proxies log messages to an existing PSR-3 compliant logger.
If a formatter is configured, the formatter's output MUST be a string and the formatted message will be fed to the wrapped PSR logger instead of the original log record's message.
$logger : \Psr\Log\LoggerInterface
PSR-3 compliant logger
$formatter : \Monolog\Formatter\FormatterInterface|null
__construct(\Psr\Log\LoggerInterface $logger, string|integer $level = \Monolog\Logger::DEBUG, boolean $bubble = true)
| \Psr\Log\LoggerInterface | $logger | The underlying PSR-3 compliant logger to which messages will be proxied |
| string|integer | $level | The minimum logging level at which this handler will be triggered |
| boolean | $bubble | Whether the messages that are handled can bubble up the stack or not |
close()
Closes the handler.
Ends a log cycle and frees all resources used by the handler.
Closing a Handler means flushing all buffers and freeing any open resources/handles.
Implementations have to be idempotent (i.e. it should be possible to call close several times without breakage) and ideally handlers should be able to reopen themselves on handle() after they have been closed.
This is useful at the end of a request and will be called automatically when the object is destroyed if you extend Monolog\Handler\Handler.
If you are thinking of calling this method yourself, most likely you should be calling ResettableInterface::reset instead. Have a look.
setFormatter(\Monolog\Formatter\FormatterInterface $formatter) : \Monolog\Handler\HandlerInterface
Sets the formatter.
| \Monolog\Formatter\FormatterInterface | $formatter |
self
getFormatter() : \Monolog\Formatter\FormatterInterface
Gets the formatter.