Expand description
Text helpers for parsing/rendering captured log lines.
Shared by the SDK’s microsandbox::sandbox::logs reader and the
CLI’s msb logs renderer — both consume the same on-disk JSON
Lines format and need the same low-level transforms.
Functions§
- base64_
decode - Decode a standard-alphabet base64 string. Returns
Noneon malformed input. Used for the opt-in raw-modee: "b64"log entries; small enough that pulling in thebase64crate isn’t justified. - split_
leading_ timestamp - Split a
runtime.log/kernel.logline into a leading RFC 3339 timestamp token (ending inZ, ≥20 chars) and the rest of the line. ReturnsNoneif the first whitespace-delimited token isn’t a plausible timestamp. - strip_
ansi - Strip ANSI escape sequences (CSI, OSC, two-byte C1).