Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
subscriber: correct fmt::init() documentation (tokio-rs#2224)
## Motivation Previously the documentation for `fmt::init()` was misleading. It stated that it was shorthand for `fmt().init()`. This lead to confusion as users would expect the same behavior from both. However `fmt::init()` would, whether you used the env-filter feature or not, rely on RUST_LOG to set the tracing level. `fmt().init()` does not do this and it must be set with a specific configuration via `with_env_filter`. ## Solution The documentation has been updated to no longer state that it is 1:1 shorthand for the other. The documentation now specifically points out that you must be using the `env-filter` feature and gives a correct example to mimic the `fmt::init()` behavior using `fmt().init()`. Fixes tokio-rs#2217 Fixes tokio-rs#1329 Co-authored-by: Eliza Weisman <eliza@buoyant.io>
- Loading branch information