output_capture
output_capture
¶
Persist build/run output — terok glue over the terok-util capture facility.
The capture mechanism (pty tee, journald/file sinks) lives in
terok_util.output_capture; this module adds
only the terok-specific bits: the TEROK_KIND/PROJECT/TASK
journald fields and the file-fallback path under
core_state_dir. The CLI command
handlers wrap an operation with tee_output;
everything below the seam is shared with the rest of the fleet.
__all__ = ['tee_output']
module-attribute
¶
tee_output(kind, *, project=None, task_id=None)
¶
Capture a build/run operation's output to journald or a log file.
Thin wrapper over
terok_util.output_capture.tee_output:
labels the stream with terok's journald fields and resolves the
file-fallback path lazily under the core state dir.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kind
|
str
|
Operation label — |
required |
project
|
str | None
|
Owning project name, when known. |
None
|
task_id
|
str | None
|
Owning task id, when known. |
None
|