Logger
extends AbstractLogger
in package
FinalYes
Tags
Table of Contents
Methods
- __construct() : mixed
- log() : void
- withChannel() : self
- Returns a new Logger bound to a different channel name, sharing the underlying sink and level. Useful for per-subsystem tagging:
- withMinLevel() : self
Methods
__construct()
public
__construct(ActorRef<string|int, Record> $sink, string $channel[, Level $minLevel = Level::Debug ][, array<int, RecordProcessor> $processors = [] ]) : mixed
Parameters
- $sink : ActorRef<string|int, Record>
- $channel : string
- $minLevel : Level = Level::Debug
- $processors : array<int, RecordProcessor> = []
log()
public
log(mixed $level, string|Stringable $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $level : mixed
- $message : string|Stringable
- $context : array<string|int, mixed> = []
withChannel()
Returns a new Logger bound to a different channel name, sharing the underlying sink and level. Useful for per-subsystem tagging:
public
withChannel(string $channel) : self
$appLogger = $logger; $httpLogger = $logger->withChannel('http');
Parameters
- $channel : string
Return values
selfwithMinLevel()
public
withMinLevel(Level $level) : self
Parameters
- $level : Level