✍️ Description of changes:
Originally a Level was parsed from one of two environment variables (or defaulted) and then converted into a LevelFilter before initializing the subscriber.
However, this precludes using RUST_LOG=off since Level does not recognize that as valid, resulting in Level::INFO (the default) being used.
LevelFilter (to which the above is converted anyway) does allow the value to be off - so it seems a little more flexible (and very very minutely faster) to parse the env var, or default value, directly into a LevelFilter.
🔏 By submitting this pull request
[x] I confirm that I've ran cargo +nightly fmt.
[x] I confirm that I've ran cargo clippy --fix.
[x] I confirm that I've made a best effort attempt to update all relevant documentation.
[x] I confirm that my contribution is made under the terms of the Apache 2.0 license.
📬 Issue #, if available:
✍️ Description of changes: Originally a
Level
was parsed from one of two environment variables (or defaulted) and then converted into aLevelFilter
before initializing the subscriber.However, this precludes using
RUST_LOG=off
sinceLevel
does not recognize that as valid, resulting inLevel::INFO
(the default) being used.LevelFilter
(to which the above is converted anyway) does allow the value to beoff
- so it seems a little more flexible (and very very minutely faster) to parse the env var, or default value, directly into aLevelFilter
.🔏 By submitting this pull request
cargo +nightly fmt
.cargo clippy --fix
.