Expand description
Renders tracing-subscriber JSON-lines records to styled Cells.
This is a separate, self-contained renderer for the trace stream kind —
it does not go through trace-stream/Pipeline; that pipeline is a
markdown/DSML renderer for model token streams and is the wrong tool for
a structured log line.
One input line (JSON or not) becomes one output line:
12:04:01 WARN myapp::db retry attempt=3
└ dim ┘ └level┘ └ cyan ─┘ └msg┘ └ dim ┘A line that fails to parse as JSON is rendered verbatim in the default
attribute rather than dropped or reported as an error — a producer will
eventually emit a panic message or a stray println!, and losing it
would be worse than showing it unstyled.
Structs§
- Trace
Renderer - Buffers a trace session’s incoming bytes into lines and renders each one
into the view, exactly as
crate::pipeline::Pipelinedoes for atokenssession – but throughrender_lineinstead oftrace-stream.
Functions§
- render_
line - Renders one line of a trace stream: a JSON
tracing-subscriberrecord, or – if the line is not valid JSON, or lacks a recognizedlevel– verbatim in the default attribute.