LateBindingLogger
in package
implements
LoggerInterface
Table of Contents
Interfaces
Properties
- $factory : Closure
- $logger : LoggerInterface|null
Methods
- __construct() : mixed
- emit() : void
- isEnabled() : bool
- Determine if the logger is enabled. Instrumentation authors SHOULD call this method each time they emit a LogRecord, to ensure they have the most up-to-date response.
Properties
$factory read-only
private
Closure
$factory
$logger
private
LoggerInterface|null
$logger
= null
Methods
__construct()
public
__construct(callable(): LoggerInterface $factory) : mixed
Parameters
- $factory : callable(): LoggerInterface
emit()
public
emit(LogRecord $logRecord) : void
Parameters
- $logRecord : LogRecord
isEnabled()
Determine if the logger is enabled. Instrumentation authors SHOULD call this method each time they emit a LogRecord, to ensure they have the most up-to-date response.
public
isEnabled([ContextInterface|null $context = null ][, int|null $severityNumber = null ]) : bool
Parameters
- $context : ContextInterface|null = null
- $severityNumber : int|null = null