#logging #tracing-test #testing-macro #default #ansi-colors #tracing-macro

n0-tracing-test

Helper functions and macros that allow for easier testing of crates that use tracing

1 unstable release

new 0.3.0 Dec 18, 2025

#253 in Testing

MIT license

17KB
106 lines

n0-tracing-test

Build status Crates.io Version Crates.io Downloads

A fork of tracing-test

We forked because we want colored output on the terminal. See the list of PRs for other changes from upstream.


This crate provides an easy way to enable logging in tests that use tracing, even if they're async. Additionally, it adds a way to assert that certain things were logged.

To enable ANSI colors and support for filtering with RUST_LOG in the terminal output, enable the pretty-log-printing feature (enabled by default).

Similar crates:

Docs / Usage / Example

See https://docs.rs/n0-tracing-test/.

License

Copyright © 2020-2023 Threema GmbH, Danilo Bargen and Contributors.

Copyright © 2025 N0, INC.

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~9–12MB
~146K SLoC