test-log
test-log is a Rust crate that provides a replacement for the built-in [test] attribute to automatically initialize logging and tracing infrastructure before running tests. It eliminates the need to manually set up loggers or subscribers in every test by handling per-test initialization of the log crate, the tracing crate, or both. The crate offers configurable feature flags: log is enabled by default for log crate support, trace can be enabled for tracing crate support, and color controls colored output. Usage involves replacing [test] with [testlog::test] or [testlog::test] on async tests stacked with attributes like [tokio::test]. A wrapping syntax [test(tokio::test)] is also supported for crates that do not cooperate with attribute stacking. The standard RUSTLOG environment variable and cargo test --nocapture flag control output verbosity and visibility. It requires Rust 1.71 or later and is useful for any Rust developer who wants to see log or tracing output from their tests without repetitive boilerplate