EnrichingLogMiddleware implements LogMiddleware
Read onlyYes
FinalYes
Attributes already on the record win over the enriched defaults.
Interfaces
- LogMiddleware
- Stateless; return a new entry to enrich, null to drop.
Methods
- __construct() : mixed
- process() : LogEntry|null
- Transform or filter a log entry.
Methods
__construct()
public
__construct(array<string, array<string|int, mixed>|bool|DateTimeInterface|float|int|string|Throwable>|Attributes $attributes) : mixed
Parameters
- $attributes : array<string, array<string|int, mixed>|bool|DateTimeInterface|float|int|string|Throwable>|Attributes
process()
Transform or filter a log entry.
public
process(LogEntry $entry) : LogEntry|null
Return the entry to pass to the next step (the same instance, or a new one
carrying enriched attributes), or null to drop it - dropping
short-circuits the rest of the pipeline and the entry is never exported.
Parameters
- $entry : LogEntry