Lock-free structured logging for Rust. Ring buffers, thread-local string interning, compressed crash snapshots.
MIT - Changelog - Contributing - crates.io - docs.rs
cargo add ttloguse ttlog::{Logger, LogLevel};
let log = Logger::new();
log.info("startup", &[("port", "8080"), ("env", "prod")]);
log.warn("slow query", &[("ms", "850")]);
log.error("upstream 503", &[("path", "/api/users")]);Drop-in replacement for tracing or log in hot paths where
allocation matters. Compressed snapshots on panic so you can replay.
| Crate | Role |
|---|---|
ttlog |
Core logger + ring buffers |
ttlog-macros |
#[trace_fn], log! macros |
ttlog-view |
Snapshot reader / pretty printer |
ttlog-benches |
Criterion suite |
| Path | Stack |
|---|---|
examples/ttlog-simple |
Basic events, levels, crash snapshot |
examples/ttlog-filereader |
Replay snapshot via ttlog-view |
cargo build --release --workspace
cargo test --workspace
cargo bench -p ttlog-benchesNumbers from ttlog-benches. Re-run on your hardware before quoting.
| metric | value |
|---|---|
| throughput | 318M events/sec @ 16 threads |
| buffer ops | 15M ops/sec (producer-heavy) |
| memory | 24 bytes per event |
| concurrency | 256+ threads tested |
PR checklist + style notes in CONTRIBUTING.md.
Security: SECURITY.md. Behaviour: CODE_OF_CONDUCT.md.
MIT. See LICENSE.