#tracing #logging #procedural #macro #proc-macro #tracing-test

macro dev tracing-test-macro

A procedural macro that allow for easier testing of crates that use tracing. Internal crate, should only be used through the tracing-test crate

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

#868 in Testing

Download history 50152/week @ 2024-07-27 50261/week @ 2024-08-03 55718/week @ 2024-08-10 55591/week @ 2024-08-17 67057/week @ 2024-08-24 64611/week @ 2024-08-31 67697/week @ 2024-09-07 59042/week @ 2024-09-14 65881/week @ 2024-09-21 75969/week @ 2024-09-28 64601/week @ 2024-10-05 75222/week @ 2024-10-12 78478/week @ 2024-10-19 77879/week @ 2024-10-26 78293/week @ 2024-11-02 92619/week @ 2024-11-09

341,292 downloads per month
Used in 284 crates (via tracing-test)

MIT license

10KB
106 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

~255–710KB
~17K SLoC