Skip to content

A Rust `tracing` compatible framework inspired by log4rs.

License

Notifications You must be signed in to change notification settings

imperva/trace4rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

70812ce · Dec 6, 2023
Nov 17, 2023
Aug 24, 2022
Dec 6, 2023
Nov 28, 2023
Nov 29, 2023
Nov 29, 2023
Nov 29, 2023
Nov 29, 2023
Aug 24, 2022
Aug 24, 2022
Jan 9, 2023
Sep 2, 2022
Sep 2, 2022
Nov 29, 2023
Sep 2, 2022
Nov 28, 2023
Dec 5, 2023
Nov 28, 2023

Repository files navigation

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

log4rs vs trace4rs for trace4rs - Bencher

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