Expand description
Shared parsing, filtering, and re-emission for the rlg CLI.
Splitting these helpers into a library lets rlg-mcp (and any
other downstream tool) reuse the same record pipeline without
depending on clap or the binary entry point.
§Example
use rlg_cli::{parse_record, Filter};
use rlg::log_level::LogLevel;
let line = r#"{"session_id":1,"time":"2026-05-30T00:00:00.000000000Z","level":"INFO","component":"svc","description":"hello","format":"JSON","attributes":{}}"#;
let record = parse_record(line).unwrap();
let filter = Filter::new().min_level(LogLevel::WARN);
assert!(!filter.matches(&record));Structs§
- Filter
- Filter criteria applied to each record as it streams past.
Functions§
- parse_
record - Parse a single line as an
rlg::log::Logrecord. - render
- Re-emit a record using the chosen
LogFormat.