#logging-tracing #logging #tracing #log4rs #logging-framework

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

#546 in Development tools

Download history 96/week @ 2024-06-28 16/week @ 2024-07-05 16/week @ 2024-07-12 73/week @ 2024-07-19 190/week @ 2024-07-26 53/week @ 2024-08-02 64/week @ 2024-08-09 68/week @ 2024-08-16 73/week @ 2024-08-23 118/week @ 2024-08-30 3/week @ 2024-09-06 7/week @ 2024-09-13 25/week @ 2024-09-20 229/week @ 2024-09-27 49/week @ 2024-10-04 21/week @ 2024-10-11

325 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–12MB
~127K SLoC