1 unstable release
| new 0.3.0 | Dec 18, 2025 |
|---|
#253 in Testing
17KB
106 lines
n0-tracing-test
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:
- test-log: Initialize loggers before running tests
- tracing-fluent-assertions: More powerful assertions that also allow analyzing spans
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
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.
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