Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Comparison

Where rlg sits among Rust logging crates. This page compares capabilities, not speed; measured numbers are in BENCHMARKS.md. “Add-on” means the capability exists through a separate crate rather than the crate itself.

Capabilityrlgtracing + tracing-subscribersloglog + env_logger
Structured key-value recordsyesyesyeskey-values behind a feature
Hierarchical spans as the data modelno (events only)yesnono
Formatting off the caller’s thread by defaultyesadd-on (tracing-appender)add-on (slog-async)no
Built-in output formats14 (JSON, ECS, GELF, OTLP, MCP, logfmt, CLF, …)text and JSONadd-on drainstext
journald / os_log sinks built inyesadd-onadd-onno
OTLP exportrlg-otlp (via a local Collector)add-on (opentelemetry crates)add-onno
Log files exposed to AI agents over MCPrlg-mcpnonono
CLI to filter and convert log filesrlg (rlg-cli)nonono
Maturity0.0.x, one maintainerwidely adoptedestablishedthe ecosystem facade

Choosing

  • Pick rlg when records should leave the application thread quickly, land in the platform’s native log store, or be read by agents and tools in one of many formats.
  • Pick tracing when spans and their context are the model you want, or you need its large ecosystem of layers.
  • Pick log with a small backend for low-volume tools where a synchronous write is simplest.

rlg bridges both facades: rlg::init() installs a log logger, and the tracing-layer feature adds a tracing_subscriber::Layer, so a program can keep its existing macros and route them through rlg. The migration guides cover log, slog and tracing.