devlog-tracing
Log subscriber for Rust's tracing
library, with a
human-readable output format designed for development builds. Uses the same format as the
devlog
library for Go.
Run cargo add devlog-tracing
to add it to your project!
Usage
devlog-tracing
is pretty much a drop-in replacement for
tracing-subscriber
,
so the initialization works the same - just replace tracing_subscriber::fmt()
with
devlog_tracing::subscriber()
:
.init;
subscriber
tracing
logs will now be formatted by the devlog-tracing
subscriber:
// In module `app::server`
warn!;
info!;
// In module `app::db`
error!;
...giving the following output (using a gruvbox terminal color scheme):