Skip to content

Commit

Permalink
Merge #586
Browse files Browse the repository at this point in the history
586: Update dependencies r=Dirbaio a=alexandrasandulescu

Hi. This PR bumps smoltcp dependencies version to `latest` according to [crates.io](https://crates.io/).
The `env_logger` update brings an API change, the [parse](https://docs.rs/env_logger/0.5.0/src/env_logger/lib.rs.html#380-383) Builder method was replaced with [parse_filters](https://docs.rs/env_logger/0.9.0/env_logger/struct.Builder.html#method.parse_filters).

Apart from `parse_filters`, I noticed that the original code parsed `RUST_LOG` **after** setting the log level to `trace` and parsing the filters. My understanding is that this overwrites the builder setup with what `RUST_LOG` contains.
My change parses the [default environment](https://docs.rs/env_logger/0.9.0/env_logger/struct.Env.html#default-environment-variables) first with `from_default_env` and then applies the filter changes.

If the desired behaviour is the original one (overwrite `setup_logging_with_clock` filters with the ones defined by `RUST_LOG`) let me know.

Tnx :)


Co-authored-by: Alexandra Sandulescu <aesa@google.com>
  • Loading branch information
bors[bot] and Alexandra Sandulescu committed Jan 31, 2022
2 parents 0536a0d + 9b5abf0 commit 61639d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Expand Up @@ -25,10 +25,10 @@ defmt = { version = "0.3", optional = true }
rand_core = { version = "0.6.3", optional = true, default-features = false }

[dev-dependencies]
env_logger = "0.5"
env_logger = "0.9"
getopts = "0.2"
rand = "0.3"
url = "1.0"
rand = "0.8"
url = "2.0"

[features]
std = ["managed/std", "rand_core/std"]
Expand Down
4 changes: 2 additions & 2 deletions examples/utils.rs
Expand Up @@ -54,8 +54,8 @@ where
}
})
.filter(None, LevelFilter::Trace)
.parse(filter)
.parse(&env::var("RUST_LOG").unwrap_or_else(|_| "".to_owned()))
.parse_filters(filter)
.parse_env("RUST_LOG")
.init();
}

Expand Down

0 comments on commit 61639d5

Please sign in to comment.