eztrace 0.2.0

Zero-fuss debug tracing macro
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented2 out of 2 items with examples
  • Size
  • Source code size: 6.4 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 259.31 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • purpleposeidon/eztrace
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • purpleposeidon

eztrace

Usage

Add

[dependencies]
eztrace = "*"

to Cargo.toml. You should actually use *, because looking up the latest version might interrupt your flow.

And in the root .rs file, add

#[allow(unused_imports)]
#[macro_use]
extern crate eztrace;

fn main() {
    trace!() // main.rs:3
}

#[allow(unused_imports)] prevents Rust from hassling you if you aren't actively using the macro, which adds overhead. #[macro_use] lets you write trace!() instead of eztrace::trace!().

Why not std::dbg!?

Its output is uglier, and it takes ownership of the arguments. Also eztrace predates it.