Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
subscriber: use
Targets
as the default filter if env-filter
is no…
…t enabled(#1781) The removal of `env-filter` from the default features in 0.3.0 has caused a lot of developer frustration. This PR changes `tracing_subscriber::fmt::init()` and `try_init` to fall back to adding a `Targets` filter parsed from the `RUST_LOG` environment variable, rather than a `LevelFilter` with the default max level. This way, `RUST_LOG`-based filtering will still "just work" out of the box with the default initialization functions, regardless of whether or not `EnvFilter` is enabled. Closes #1697 Co-authored-by: Eliza Weisman <[email protected]>
- Loading branch information