From fd4cb4a3060c7f72d47a84a14d0d3915a83adc07 Mon Sep 17 00:00:00 2001 From: Erwan Leboucher Date: Wed, 7 Oct 2026 18:58:49 +0200 Subject: [PATCH] fix(runtime): Log final runtime metrics at debug --- src/main/runtime.rs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/main/runtime.rs b/src/main/runtime.rs index 9bfb453f8..7479683c5 100644 --- a/src/main/runtime.rs +++ b/src/main/runtime.rs @@ -87,21 +87,10 @@ fn enable_histogram(builder: &mut Builder, args: &Args) { #[cfg(tokio_unstable)] #[tracing::instrument(name = "stop", level = "info", skip_all)] pub(super) fn shutdown(server: &Arc, runtime: tokio::runtime::Runtime) { - use conduwuit_core::event; - use tracing::Level; - - // The final metrics output is promoted to INFO when tokio_unstable is - // active in a release/bench mode and DEBUG is likely optimized out - const LEVEL: Level = if cfg!(debug_assertions) { - Level::DEBUG - } else { - Level::INFO - }; - wait_shutdown(server, runtime); let runtime_metrics = server.server.metrics.runtime_interval().unwrap_or_default(); - event!(LEVEL, ?runtime_metrics, "Final runtime metrics"); + conduwuit_core::debug!(?runtime_metrics, "Final runtime metrics"); } #[cfg(not(tokio_unstable))]