Logger
in package
implements
LoggerInterface
uses
LogsMessagesTrait
Table of Contents
Interfaces
Properties
- $config : LoggerConfig
- $loggerSharedState : LoggerSharedState
- $scope : InstrumentationScopeInterface
Methods
- 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.
- updateConfig() : void
- logDebug() : void
- logError() : void
- logInfo() : void
- logNotice() : void
- logWarning() : void
- doLog() : void
- shouldLog() : bool
Properties
$config
private
LoggerConfig
$config
$loggerSharedState read-only
private
LoggerSharedState
$loggerSharedState
$scope read-only
private
InstrumentationScopeInterface
$scope
Methods
emit()
public
emit(LogRecord $logRecord) : void
Parameters
- $logRecord : LogRecord
Tags
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
Tags
Return values
boolupdateConfig()
public
updateConfig(Configurator<string|int, LoggerConfig> $configurator) : void
Parameters
- $configurator : Configurator<string|int, LoggerConfig>
Tags
logDebug()
protected
static logDebug(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
logError()
protected
static logError(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
logInfo()
protected
static logInfo(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
logNotice()
protected
static logNotice(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
logWarning()
protected
static logWarning(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
doLog()
private
static doLog(string $level, string $message, array<string|int, mixed> $context) : void
Parameters
- $level : string
- $message : string
- $context : array<string|int, mixed>
shouldLog()
private
static shouldLog(string $level) : bool
Parameters
- $level : string