DEBUG
DEBUG = 100
Detailed debug information
Monolog log channel
It contains a stack of Handlers and a stack of Processors, and uses them to store records that are added to it.
$handlers : array<mixed,\Monolog\Handler\HandlerInterface>
The handler stack
__construct(string $name, array<mixed,\Monolog\Handler\HandlerInterface> $handlers = array(), array<mixed,callable> $processors = array())
string | $name | The logging channel |
array<mixed,\Monolog\Handler\HandlerInterface> | $handlers | Optional stack of handlers, the first one in the array is called first, etc. |
array<mixed,callable> | $processors | Optional array of processors |
pushHandler(\Monolog\Handler\HandlerInterface $handler) : $this
Pushes a handler on to the stack.
\Monolog\Handler\HandlerInterface | $handler |
popHandler() : \Monolog\Handler\HandlerInterface
Pops a handler from the stack
setHandlers(array<mixed,\Monolog\Handler\HandlerInterface> $handlers) : $this
Set handlers, replacing all existing ones.
If a map is passed, keys will be ignored.
array<mixed,\Monolog\Handler\HandlerInterface> | $handlers |
getHandlers() : array<mixed,\Monolog\Handler\HandlerInterface>
useMicrosecondTimestamps(boolean $micro)
Control the use of microsecond resolution timestamps in the 'datetime' member of new records.
Generating microsecond resolution timestamps by calling microtime(true), formatting the result via sprintf() and then parsing the resulting string via \DateTime::createFromFormat() can incur a measurable runtime overhead vs simple usage of DateTime to capture a second resolution timestamp in systems which generate a large number of log events.
boolean | $micro | True to use microtime() to create timestamps |
close()
Ends a log cycle and frees all resources used by handlers.
Closing a Handler means flushing all buffers and freeing any open resources/handles. Handlers that have been closed should be able to accept log records again and re-open themselves on demand, but this may not always be possible depending on implementation.
This is useful at the end of a request and will be called automatically on every handler when they get destructed.
reset()
Ends a log cycle and resets all handlers and processors to their initial state.
Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal state, and getting it back to a state in which it can receive log records again.
This is useful in case you want to avoid logs leaking between two requests or jobs when you have a long running process like a worker or an application server serving multiple requests in one process.
log(mixed $level, string $message, array $context = array()) : boolean
Adds a log record at an arbitrary level.
This method allows for compatibility with common interfaces.
mixed | $level | The log level |
string | $message | The log message |
array | $context | The log context |
Whether the record has been processed
warning(string $message, array $context = array()) : boolean
Adds a log record at the WARNING level.
This method allows for compatibility with common interfaces.
string | $message | The log message |
array | $context | The log context |
Whether the record has been processed
critical(string $message, array $context = array()) : boolean
Adds a log record at the CRITICAL level.
This method allows for compatibility with common interfaces.
string | $message | The log message |
array | $context | The log context |
Whether the record has been processed
emergency(string $message, array $context = array()) : boolean
Adds a log record at the EMERGENCY level.
This method allows for compatibility with common interfaces.
string | $message | The log message |
array | $context | The log context |
Whether the record has been processed