#async #tracing #testing-tools #test #assert #logging #macro

dev tracing-test

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

4 releases

0.2.3 Jul 20, 2022
0.2.2 Jun 3, 2022
0.2.1 Nov 23, 2021
0.2.0 Nov 23, 2021
0.1.0 Nov 19, 2020

#29 in Testing

Download history 15376/week @ 2022-08-15 14054/week @ 2022-08-22 15913/week @ 2022-08-29 14371/week @ 2022-09-05 17386/week @ 2022-09-12 15061/week @ 2022-09-19 17216/week @ 2022-09-26 18955/week @ 2022-10-03 22763/week @ 2022-10-10 21447/week @ 2022-10-17 20553/week @ 2022-10-24 19193/week @ 2022-10-31 19914/week @ 2022-11-07 19648/week @ 2022-11-14 17624/week @ 2022-11-21 18266/week @ 2022-11-28

76,565 downloads per month
Used in 62 crates (60 directly)

MIT license

12KB
85 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-2022 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

~4.5MB
~91K SLoC