From cd816ce211c305e33f71af96781bcfa772b5cb28 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Thu, 5 Feb 2026 23:14:20 +0100 Subject: [PATCH] chore: add warning if 'tracy' not enabled (#21867) --- crates/node/core/src/args/log.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/crates/node/core/src/args/log.rs b/crates/node/core/src/args/log.rs index 035f78725a..90cec8b622 100644 --- a/crates/node/core/src/args/log.rs +++ b/crates/node/core/src/args/log.rs @@ -166,10 +166,16 @@ impl LogArgs { tracer = tracer.with_samply(config); } - #[cfg(feature = "tracy")] if self.tracy { - let config = self.layer_info(LogFormat::Terminal, self.tracy_filter.clone(), false); - tracer = tracer.with_tracy(config); + #[cfg(feature = "tracy")] + { + let config = self.layer_info(LogFormat::Terminal, self.tracy_filter.clone(), false); + tracer = tracer.with_tracy(config); + } + #[cfg(not(feature = "tracy"))] + { + tracing::warn!("`--log.tracy` requested but `tracy` feature was not compiled in"); + } } let guard = tracer.init_with_layers(layers)?;