facet_xml/
tracing_macros.rs

1//! Tracing macros that compile to nothing when tracing is disabled.
2//!
3//! Tracing is enabled when either:
4//! - The `tracing` feature is enabled (for production use)
5//! - Running tests (`cfg(test)`) - tracing is always available in tests
6
7/// Emit a trace-level log message.
8#[cfg(any(test, feature = "tracing"))]
9#[macro_export]
10macro_rules! trace {
11    ($($arg:tt)*) => {
12        tracing::trace!($($arg)*);
13    };
14}
15
16/// Emit a trace-level log message (no-op version).
17#[cfg(not(any(test, feature = "tracing")))]
18#[macro_export]
19macro_rules! trace {
20    ($($arg:tt)*) => {};
21}