Skip to main content

parse_record

Function parse_record 

Source
pub fn parse_record(line: &str) -> Result<Log, Error>
Expand description

Parse a single line as an rlg::log::Log record.

Accepts the canonical LogFormat::JSON shape — the same one that rlg’s Display impl emits for LogFormat::JSON and NDJSON. Other rlg formats (MCP, OTLP, ECS, …) wrap the underlying record inside a transport envelope and are not yet parsed back to a Log (see crate-level docs for the roadmap).

§Errors

Returns serde_json::Error if the input is not valid JSON in the canonical shape.