Commit 20206d7
Use event filter (#925)
* Use LevelFilter instead of Level
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`.
* rustfmt
---------
Co-authored-by: Martin Bartlett <[email protected]>1 parent 27191d0 commit 20206d7
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
0 commit comments