#tracing #logging #log4rs

nightly trace4rs

log4rs like usability with the tracing crate as the base

4 releases (2 breaking)

Uses new Rust 2021

0.3.1 Oct 28, 2022
0.3.0 Oct 28, 2022
0.2.1 Oct 26, 2022
0.1.0 Sep 14, 2022

#199 in Debugging

Download history 86/week @ 2022-09-14 162/week @ 2022-09-21 256/week @ 2022-09-28 3/week @ 2022-10-05 91/week @ 2022-10-12 398/week @ 2022-10-19 184/week @ 2022-10-26 239/week @ 2022-11-02 189/week @ 2022-11-09 211/week @ 2022-11-16 279/week @ 2022-11-23 149/week @ 2022-11-30

898 downloads per month

MIT license

60KB
1.5K SLoC


lib.rs:

This crate allows users to configure output from tracing in the same way as you would configure the output of log4rs.

Overview

For a usage example see the examples folder or src/test.rs.

Benchmarks & Results

The takeaway is that the actual appenders are roughly equivalent in performance. However, when using the tracing macros vs the log macros the appender performance is roughly 2 orders of magnitude larger. See for yourself with cargo bench --features tracing-macros

Dependencies

~3.5–9MB
~168K SLoC