Writes each upstream String (or every element of a [String]) as one trimmed JSON-Lines record under output_path. Append mode accumulates records in one file; rotate mode writes each record to its own file with a 6-digit index suffix.
Typical backends
Event journal. Serialise each pipeline record to a JSON line and accumulate it in a single rolling log file.
Per-sample dataset capture. Pull frames from a source, build a JSON record per frame, and write one numbered file per record for later sharding.
Caveats
- I/O contractEach input becomes one line; trailing carriage-returns and newlines are stripped, but newlines embedded inside the JSON are preserved verbatim, which can break naive line-by-line readers downstream.
- I/O contractA list input is exploded — every element is appended or rotated as its own independent record in arrival order.
- FallbackAny
mode other than rotate takes the append path, opening the target in binary append mode. - State lifetimeThe rotate index is a process-local counter starting at zero; restarting the container resets it, so prior numbered files are overwritten unless
output_path or filename also changes. - Hard constraintAppend mode shares one open file with no cross-process locking; concurrent writers on the same path can interleave partial lines.
- State lifetimeThe output directory is created once at first invocation and all config keys are captured at startup; runtime changes have no effect.