Nexus API Reference

Record
in package

Read onlyYes
FinalYes
Tags
psalm-api

Immutable log record carried from the PSR-3 façade through the actor's mailbox to the registered handlers. Placeholder interpolation (PSR-3 §1.2) happens at construction so the actor never re-renders the message.

Two metadata buckets, Monolog/SLF4J-style:

  • context: per-call arguments the caller passed in
  • extra: ambient process/thread/request metadata (typically populated from MDC by the Logger façade)

Table of Contents

Properties

$channel  : string
$context  : array<string|int, mixed>
$extra  : array<string|int, mixed>
$level  : Level
$message  : string
$timestamp  : float

Methods

__construct()  : mixed
create()  : self
Factory that performs PSR-3 placeholder interpolation and strips consumed keys from the context, leaving structural fields for the handlers to render.
withExtra()  : self

Properties

$context

public array<string|int, mixed> $context

$extra

public array<string|int, mixed> $extra = []

$timestamp

public float $timestamp

Methods

__construct()

public __construct(Level $level, string $message, array<string, mixed> $context, string $channel, float $timestamp[, array<string, mixed> $extra = [] ]) : mixed
Parameters
$level : Level
$message : string
$context : array<string, mixed>

Context after consumed placeholders are removed.

$channel : string
$timestamp : float
$extra : array<string, mixed> = []

Ambient metadata (MDC).

create()

Factory that performs PSR-3 placeholder interpolation and strips consumed keys from the context, leaving structural fields for the handlers to render.

public static create(Level $level, string|Stringable $message, array<string, mixed> $context, string $channel[, array<string, mixed> $extra = [] ]) : self
Parameters
$level : Level
$message : string|Stringable
$context : array<string, mixed>
$channel : string
$extra : array<string, mixed> = []

Ambient metadata (MDC) — NOT searched for placeholders.

Return values
self

withExtra()

public withExtra(array<string, mixed> $extra) : self
Parameters
$extra : array<string, mixed>
Return values
self

        
On this page

Search results