Log
class Log extends Mutator (View source)
Logs a value to a PSR-3 logger.
A default logger can be set using the setDefaultLogger
method.
If no logger is provided to the constructor, the default logger will be used.
If no default logger is set, an exception will be thrown.
Traits
Methods
__construct(LoggerInterface $logger = null, string $prefix = '', string $level = LogLevel::DEBUG, array $context = [])
No description
static Log
make(LoggerInterface $logger = null, string $prefix = '', string $level = LogLevel::DEBUG, array $context = [])
No description
mixed
mutate(mixed $value)
Mutate the input value.
static LoggerInterface|null
setDefaultLogger(LoggerInterface|null $logger)
Set the default logger instance to use. If no logger is provided to the constructor, this logger will be used.
Details
__construct(LoggerInterface $logger = null, string $prefix = '', string $level = LogLevel::DEBUG, array $context = [])
No description
static Log
make(LoggerInterface $logger = null, string $prefix = '', string $level = LogLevel::DEBUG, array $context = [])
No description
mixed
mutate(mixed $value)
Mutate the input value.
protected string
resolveStringInput(mixed $value)
No description
static LoggerInterface|null
setDefaultLogger(LoggerInterface|null $logger)
Set the default logger instance to use. If no logger is provided to the constructor, this logger will be used.