AttributeFilteringLogMiddleware implements LogMiddleware
Read onlyYes
FinalYes
Drops log entries whose attributes match a configured {@see AttributeFilter}.
Returns the entry unchanged when it survives the filter, or null to drop it (short-circuiting the rest of the pipeline). The drop decision is the filter's cached closure, evaluated against the configured AttributeSources.
Interfaces
- LogMiddleware
- A chainable log-processing step inside a {@see Processor\PipelineLogProcessor}.
Methods
- __construct() : mixed
- process() : LogEntry|null
- Transform or filter a log entry.
Methods
__construct()
public
__construct(AttributeFilter $filter) : mixed
Parameters
- $filter : AttributeFilter
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