rlg-cli 0.0.11

`rlg` — `jq` for structured logs. Tail, filter, and convert log streams across all 14 `rlg` formats from the command line.
Documentation

Install

cargo install rlg-cli

The binary is named rlg. Requires Rust 1.88.0 or newer (edition 2024).

Usage

# Default: read JSON records from stdin, emit Logfmt to stdout.
my-service | rlg

# Tail a file and convert to MCP-shaped JSON-RPC notifications.
rlg /var/log/app.ndjson --format mcp

# Drop everything below ERROR.
my-service | rlg --min-level error

# Show only records from the `db` component.
my-service | rlg --component db

# Filter by a single attribute (value parsed as JSON).
my-service | rlg --attr user_id=42
my-service | rlg --attr 'region="eu-west-1"'

# Combine filters and pick an output format.
rlg /var/log/app.ndjson \
    --min-level warn \
    --component api \
    --format ecs

Supported output formats

clf, cef, elf, w3c, apache, log4j-xml, json, gelf, logstash, ndjson, mcp, otlp, logfmt, ecs.

Input

For 0.0.11, the CLI accepts the canonical LogFormat::JSON shape — one record per line. Unparseable lines pass through verbatim so you can pipe non-rlg log noise through rlg without losing entries.

Parsers for the other input formats (MCP transport envelope, OTLP, ECS, GELF, Logstash) are tracked under crates/rlg-cli/doc/INPUT-FORMATS.md and land incrementally.

License

Dual-licensed under Apache 2.0 or MIT, at your option.