Duck TTLog
High-performance, low-allocation Rust logging framework. Lock-free ring buffer, compile-time macros, crash-safe snapshots.
Logs fast enough to leave in production
A logging framework built for high-throughput Rust. Non-blocking writes, interned strings, decoupled IO, and a snapshot buffer that survives a crash.
Compile-time macros
info!, debug!, warn!, error! do most work at macro-expansion time. Runtime cost is a ring-buffer write, not a formatter call.
Lock-free ring buffer
Log calls never block. Events land in an in-memory ring buffer a writer thread drains asynchronously.
String interning
Repeated messages, file paths, module paths, and keys are stored once. Memory use stays flat under sustained load.
Decoupled listeners
Listeners (stdout, file, network) run on their own thread. Application code never waits on IO from logging.
Snapshot buffer
A ring of recent events flushes to a compressed on-disk snapshot on demand — and automatically on panic or SIGTERM.
Crash + signal capture
Panic hook and signal handler write a snapshot before the process dies. Post-mortem has the last N events in context.
Quick setup
Add to Cargo. Init once. Log from anywhere.
// Add to Cargo.toml
[dependencies]
ttlog = "0.2"
// Use it
use ttlog::{Trace, info};
Trace::init();
info!("hello from ttlog");Free & open source
gentleduck is MIT licensed and will always be free and open source. Every package ships with full source access — fork it, modify it, own it.