Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracing-subscriber: correct fmt::init() documentation #2224

Merged
merged 3 commits into from Jul 28, 2022

Commits on Jul 16, 2022

  1. tracing-subscriber: correct fmt::init() documentation

    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`.
    
    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 tokio-rs#1329
    cgbur committed Jul 16, 2022
    Copy the full SHA
    e0f4bef View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2022

  1. Copy the full SHA
    b0ab4b6 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    ba39288 View commit details
    Browse the repository at this point in the history