Nexus API Reference

Logger extends AbstractLogger
in package

FinalYes
Tags
psalm-api

PSR-3 LoggerInterface that forwards records to a LogActor via tell(). Calls return as soon as the message is enqueued — no formatting or I/O happens on the caller's thread.

minLevel is checked before constructing the Record so below-threshold calls cost only a single int comparison.

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

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
self

withMinLevel()

public withMinLevel(Level $level) : self
Parameters
$level : Level
Return values
self

        
On this page

Search results