Skip to content

Commit c6cc08b

Browse files
grtlrWumpf
authored andcommitted
Upgrade env_logger to replace humantime with jiff (#9253)
Fixes CI failures due to `humantime` being marked as unmaintained. It looks like it will take some time for `object_store` to move on, so I'm adding [`RUSTSEC-2025-0014`](https://rustsec.org/advisories/RUSTSEC-2025-0014) to the ignore list for now: * https://github.com/apache/arrow-rs/issues/7264 * apache/arrow-rs#7261 * Reminder issue: #9255 --------- Co-authored-by: Andreas Reich <[email protected]>
1 parent 475aa64 commit c6cc08b

File tree

6 files changed

+26
-12
lines changed

6 files changed

+26
-12
lines changed

Cargo.lock

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2324,16 +2324,26 @@ dependencies = [
23242324
"syn 2.0.99",
23252325
]
23262326

2327+
[[package]]
2328+
name = "env_filter"
2329+
version = "0.1.3"
2330+
source = "registry+https://github.com/rust-lang/crates.io-index"
2331+
checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0"
2332+
dependencies = [
2333+
"log",
2334+
]
2335+
23272336
[[package]]
23282337
name = "env_logger"
2329-
version = "0.10.2"
2338+
version = "0.11.7"
23302339
source = "registry+https://github.com/rust-lang/crates.io-index"
2331-
checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580"
2340+
checksum = "c3716d7a920fb4fac5d84e9d4bce8ceb321e9414b4409da61b07b75c1e3d0697"
23322341
dependencies = [
2333-
"humantime",
2334-
"is-terminal",
2342+
"anstream",
2343+
"anstyle",
2344+
"env_filter",
2345+
"jiff",
23352346
"log",
2336-
"termcolor",
23372347
]
23382348

23392349
[[package]]
@@ -6264,6 +6274,7 @@ dependencies = [
62646274
name = "re_log"
62656275
version = "0.23.0-alpha.1+dev"
62666276
dependencies = [
6277+
"env_filter",
62676278
"env_logger",
62686279
"js-sys",
62696280
"log",
@@ -7553,7 +7564,7 @@ dependencies = [
75537564
"arrow",
75547565
"clap",
75557566
"document-features",
7556-
"env_logger",
7567+
"env_filter",
75577568
"itertools 0.13.0",
75587569
"log",
75597570
"puffin",

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ document-features = "0.2.8"
189189
econtext = "0.2" # Prints error contexts on crashes
190190
ehttp = "0.5.0"
191191
enumset = "1.0.12"
192-
env_logger = { version = "0.10", default-features = false }
192+
env_filter = { version = "0.1", default-features = false }
193+
env_logger = { version = "0.11", default-features = false }
193194
ffmpeg-sidecar = { version = "2.0.2", default-features = false }
194195
fixed = { version = "1.28", default-features = false }
195196
fjadra = "0.2.1"

crates/top/rerun/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ image = ["re_types?/image"]
7474
ecolor = ["re_types?/ecolor"]
7575

7676
## Integration with the [`log`](https://crates.io/crates/log/) crate.
77-
log = ["dep:env_logger", "dep:log"]
77+
log = ["dep:env_filter", "dep:log"]
7878

7979
## Enable faster native video decoding with assembly.
8080
## You need to install [nasm](https://nasm.us/) to compile with this feature.
@@ -157,7 +157,7 @@ re_viewer = { workspace = true, optional = true }
157157
re_viewer_context = { workspace = true, optional = true }
158158
re_web_viewer_server = { workspace = true, optional = true }
159159

160-
env_logger = { workspace = true, optional = true }
160+
env_filter = { workspace = true, optional = true }
161161
log = { workspace = true, optional = true }
162162

163163
# Native dependencies:

crates/top/rerun/src/log_integration.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use crate::RecordingStream;
2323
#[derive(Debug)]
2424
pub struct Logger {
2525
rec: RecordingStream,
26-
filter: Option<env_logger::filter::Filter>,
26+
filter: Option<env_filter::Filter>,
2727
path_prefix: Option<String>,
2828
}
2929

@@ -60,7 +60,7 @@ impl Logger {
6060
/// [env_logger syntax]: https://docs.rs/env_logger/latest/env_logger/index.html#enabling-logging
6161
#[inline]
6262
pub fn with_filter(mut self, filter: impl AsRef<str>) -> Self {
63-
use env_logger::filter::Builder;
63+
use env_filter::Builder;
6464
self.filter = Some(Builder::new().parse(filter.as_ref()).build());
6565
self
6666
}
@@ -70,7 +70,7 @@ impl Logger {
7070
/// All calls to [`log`] macros will go through this [`Logger`] from this point on.
7171
pub fn init(mut self) -> Result<(), log::SetLoggerError> {
7272
if self.filter.is_none() {
73-
use env_logger::filter::Builder;
73+
use env_filter::Builder;
7474
self.filter = Some(Builder::new().parse(&re_log::default_log_filter()).build());
7575
}
7676

crates/utils/re_log/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ tracing = { workspace = true, features = ["log"] }
3737

3838
# Native dependencies:
3939
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
40+
env_filter.workspace = true
4041
env_logger = { workspace = true, optional = true, features = [
4142
"auto-color",
4243
"humantime",

deny.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ version = 2
3131
ignore = [
3232
"RUSTSEC-2024-0384", # Waiting for https://github.com/console-rs/indicatif/pull/666
3333
"RUSTSEC-2024-0436", # https://rustsec.org/advisories/RUSTSEC-2024-0436 - paste is unmaintained - https://github.com/dtolnay/paste
34+
"RUSTSEC-2025-0014", # TODO(#9255): Waiting for https://github.com/apache/arrow-rs/issues/7264
3435
]
3536

3637

0 commit comments

Comments
 (0)