First enable tracing and observe the crate names it uses for tracing.
Then enable the configuration in which we can set the level of tracing for each crate.
Instead of using the name of our crate hard-coded we can get it from Cargo.toml using env!("CARGO_CRATE_NAME").
[package]
name = "demo"
version = "0.1.0"
edition = "2024"
[dependencies]
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
which = { version = "8.0.2", features = ["tracing"] }