Skip to content

How to avoid the impact of logs when doing performance testing in libraries that use tracing? #2595

Answered by hds
jiesia asked this question in Q&A
Discussion options

You must be logged in to vote

You can use compile time filters to turn all tracing off: https://docs.rs/tracing/latest/tracing/level_filters/index.html#compile-time-filters

You want the max_level_off filter feature (you specify this in Cargo.toml, see the docs at the link for an example).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants