Logging that never blocks
A fast, low-allocation logging framework for Rust. Lock-free ring buffer, compile-time macros, and snapshots that survive a crash.
Compile-time macros
info!,debug!,warn!, anderror!do most of their work at expansion time. At runtime, a log call is a ring-buffer write.Lock-free ring buffer
Log calls never block. Events land in an in-memory ring buffer, and a writer thread drains it in the background.
String interning
Repeated messages, file paths, module paths, and keys are stored once. Memory stays flat under sustained load.
Separate listeners
Stdout, file, and network listeners run on their own thread. Your code never waits on logging IO.
Snapshots
Recent events flush to a compressed snapshot on disk whenever you ask, and on panic or SIGTERM.
Crash capture
A panic hook and a signal handler write a snapshot before the process exits. Post-mortems start with the last N events.
Install
Add it to Cargo.toml, init once, and 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.