Logger Class
Aurora\Log Namespace
Extends
- C AbstractLogger
Interfaces
- I LoggerInterface
Properties
levels
Array to map log levels to integers
public $levels = []: array
adapters
Adapters array
protected $adapters = []: array
Methods
attach
Add a new Adapter
Parameters
-
Aurora\Log\Adapter\AdapterInterface
$adapter
— Adapter instance
Return Value
$this
Signature
public function attach(Aurora\Log\Adapter\AdapterInterface $adapter)
log
Logs with an arbitrary level
Parameters
-
mixed
$level
— Log level -
mixed
$message
— Message to log -
mixed
$context
— Additional context data
Signature
public function log(mixed $level, mixed $message, mixed $context = [])
interpolate
Interpolate placeholders
Parameters
-
string
$message
— Message with placeholders -
array
$context
— Array of context data
Return Value
string
Signature
protected function interpolate(string $message, array $context = []): string
map
Map a LogLevel to a numeric value
Parameters
-
mixed
$level
— Log level
Return Value
int
Signature
protected function map(mixed $level): int