n0-tracing-test 0.3.0

Helper functions and macros that allow for easier testing of crates that use `tracing`.
Documentation
# n0-tracing-test

[![Build status][workflow-badge]][workflow]
[![Crates.io Version][crates-io-badge]][crates-io]
[![Crates.io Downloads][crates-io-download-badge]][crates-io-download]

**A fork of [tracing-test](https://github.com/dbrgn/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](https://tracing.rs/), 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]https://crates.io/crates/test-log: Initialize loggers before
  running tests
- [tracing-fluent-assertions]https://crates.io/crates/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]LICENSE-APACHE or
   http://www.apache.org/licenses/LICENSE-2.0)
 * MIT license ([LICENSE-MIT]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.


<!-- Badges -->
[workflow]: https://github.com/n0-computer/n0-tracing-test/actions?query=workflow%3ACI
[workflow-badge]: https://img.shields.io/github/actions/workflow/status/n0-computer/n0-tracing-test/ci.yml?branch=main
[crates-io]: https://crates.io/crates/n0-tracing-test
[crates-io-badge]: https://img.shields.io/crates/v/n0-tracing-test.svg?maxAge=3600
[crates-io-download]: https://crates.io/crates/n0-tracing-test
[crates-io-download-badge]: https://img.shields.io/crates/d/n0-tracing-test.svg?maxAge=3600
[list of PRs]: https://github.com/n0-computer/n0-tracing-test/pulls?q=is%3Apr+is%3Aclosed
[colored output on the terminal]: https://github.com/dbrgn/tracing-test/pull/51