#logging-tracing #assertions #testing-debugging #debugging-logging #async #testing-tools

dev tracing-test

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

6 releases

0.2.5 Jun 2, 2024
0.2.4 Feb 1, 2023
0.2.3 Jul 20, 2022
0.2.2 Jun 3, 2022
0.1.0 Nov 19, 2020

#20 in Testing

Download history 49171/week @ 2024-07-19 50399/week @ 2024-07-26 49738/week @ 2024-08-02 55591/week @ 2024-08-09 55070/week @ 2024-08-16 64318/week @ 2024-08-23 62992/week @ 2024-08-30 72635/week @ 2024-09-06 53802/week @ 2024-09-13 69874/week @ 2024-09-20 76657/week @ 2024-09-27 64651/week @ 2024-10-04 71655/week @ 2024-10-11 79308/week @ 2024-10-18 78009/week @ 2024-10-25 79461/week @ 2024-11-01

322,196 downloads per month
Used in 278 crates (235 directly)

MIT license

15KB
86 lines

tracing-test

Build status Crates.io Version Crates.io Downloads

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.

The focus is on testing the logging, not on debugging the tests. That's why the library ensures that the logs do not depend on external state. For example, the RUST_LOG env variable is not used for log filtering.

Similar crates:

Docs / Usage / Example

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

License

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

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

~7MB
~115K SLoC