From d95f84be3f4873b3766c503c6e5c29f0062c9d7e Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Thu, 26 Nov 2026 12:16:34 +0100 Subject: [PATCH] Upgraded flexi_logger to v0.32.0 --- runtime/Cargo.lock | 6 +++--- runtime/Cargo.toml | 2 +- runtime/src/log.rs | 7 +++++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/runtime/Cargo.lock b/runtime/Cargo.lock index 596105277..272c716c2 100644 --- a/runtime/Cargo.lock +++ b/runtime/Cargo.lock @@ -2444,11 +2444,11 @@ dependencies = [ [[package]] name = "flexi_logger" -version = "0.31.10" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4945fa9cdfd7571192cf559c186d45ab36c8034482a2d217a19bdc566f190cc" +checksum = "5e87b74024da93123949cca26cb6e366744234fdd4d7914eb3dfeab0baa82d51" dependencies = [ - "chrono", + "jiff 1.0.2", "log", "nu-ansi-term", "regex", diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 17323b540..191fa4461 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -30,7 +30,7 @@ tokio = { version = "1.54.1", features = ["rt", "rt-multi-thread", "macros", "pr tokio-stream = { version = "0.1.19", features = ["sync"] } futures = "0.3.34" async-stream = "0.3.6" -flexi_logger = "0.31.10" +flexi_logger = "0.32.0" chrono = "0.4.45" dirs = "7.0.0" log = { version = "0.4.35", features = ["kv"] } diff --git a/runtime/src/log.rs b/runtime/src/log.rs index 9acb23795..4035bf001 100644 --- a/runtime/src/log.rs +++ b/runtime/src/log.rs @@ -338,10 +338,13 @@ fn get_log_time(now: &mut DeferredNow, record: &log::Record) -> LogTime { }, // Case: The event happened earlier, e.g., in the .NET server. The logger - // runs in UTC (see init_logging), so this time is written in UTC as well: + // runs in UTC (see init_logging), so this time is written in UTC as well. + // flexi_logger keeps the arrival time as a jiff value, whose microseconds + // since the Unix epoch carry it over to chrono: Some(created_at) => LogTime { timestamp: created_at.format(flexi_logger::TS_DASHES_BLANK_COLONS_DOT_BLANK).to_string(), - delay_ms: get_notable_delay_ms(created_at, now.now_utc_owned()), + delay_ms: DateTime::::from_timestamp_micros(now.now().timestamp().as_microsecond()) + .and_then(|arrived_at| get_notable_delay_ms(created_at, arrived_at)), }, } }