TextStreamSink
Human-readable single-line sink for local development.
Writes to any stream (stderr by default). Not intended for structured log aggregation — use JsonStdoutSink in containers. 2026-07-01T08:02:55.123Z WARNING Quiote.Routing: no route matched /foo {rid=abc}
Synopsis
Section titled “Synopsis”class TextStreamSink extends AbstractStreamSink
| Extends | AbstractStreamSink |
| Source | Logging/Sink/TextStreamSink.php |
Constructor
Section titled “Constructor”__construct()
Section titled “__construct()”public function __construct(string $stream = 'php://stderr', Level $minLevel = Quiote\Logging\Level::Debug, array<string, Level> $categoryOverrides = [], resource|null $streamResource = null): mixed
An already-open writable resource (e.g. for tests), used instead of opening $stream lazily.
| Parameter | Type | Description |
|---|---|---|
$stream | string | A stream path (opened lazily, append). |
$minLevel | Level | Minimum level this sink accepts by default. |
$categoryOverrides | array``<``string``, Level> | category-prefix => min level. |
$streamResource | `resource“ | “null` |
Returns mixed
Inherited methods
Section titled “Inherited methods”These come from an ancestor and are documented where they are declared.
| Method | Declared in | Description |
|---|---|---|
emit() | AbstractStreamSink | Renders the event through the subclass TextStreamSink::format() and writes it as one newline-terminated line. |
flush() | AbstractStreamSink | Flushes the underlying stream if one has been opened. |
isEnabled() | AbstractStreamSink | Whether this sink accepts an event at $level for $category. |