mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-28 12:10:37 +00:00

## Motivation `tokio-trace` should have static verbosity level filtering, like the `log` crate. The static max verbosity level should be controlled at compile time with a set of features. It should be possible to set a separate max level for release and debug mode builds. ## Solution We can do this fairly similarly to how the `log` crate does it: `tokio-trace` should export a constant whose value is set based on the static max level feature flags. Then, we add an if statement to the `span!` and `event!` macros which tests if that event or span's level is enabled. Closes #959
11 lines
193 B
TOML
11 lines
193 B
TOML
[workspace]
|
|
|
|
[package]
|
|
name = "test_cargo_max_level_features"
|
|
version = "0.1.0"
|
|
publish = false
|
|
|
|
[dependencies.tokio-trace]
|
|
path = ".."
|
|
features = ["max_level_debug", "release_max_level_info"]
|