#logging #log4rs #tracing

trace4rs

log4rs like usability with the tracing crate as the base

12 releases

0.6.0-rc Nov 30, 2023
0.5.1 Aug 1, 2023
0.5.0 Dec 21, 2022
0.4.6 Dec 16, 2022
0.1.0 Sep 14, 2022

#315 in Development tools

Download history 176/week @ 2023-12-22 88/week @ 2023-12-29 318/week @ 2024-01-05 754/week @ 2024-01-12 1409/week @ 2024-01-19 1404/week @ 2024-01-26 2701/week @ 2024-02-02 1843/week @ 2024-02-09 885/week @ 2024-02-16 604/week @ 2024-02-23 130/week @ 2024-03-01 388/week @ 2024-03-08 78/week @ 2024-03-15 406/week @ 2024-03-22 88/week @ 2024-03-29 266/week @ 2024-04-05

923 downloads per month

MIT license

90KB
2K SLoC

trace4rs

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

Dev suggestions

  • cargo install cargo-binstall
  • cargo install cargo-update
  • cargo install cargo-nextest

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

~5–13MB
~126K SLoC