espocrm_rs/
tracing_if.rs

1/// Macro to conditionally call [tracing::trace] if tracing is enabled
2#[macro_export]
3macro_rules! trace_if {
4    ($($tts:tt)*) => {
5        {
6            #[cfg(feature = "tracing")]
7            {
8                ::tracing::trace!($($tts)*);
9            }
10        }
11    }
12}
13
14/// Macro to conditionally call [tracing::debug] if tracing is enabled
15#[macro_export]
16macro_rules! debug_if {
17    ($($tts:tt)*) => {
18        {
19            #[cfg(feature = "tracing")]
20            {
21                ::tracing::debug!($($tts)*);
22            }
23        }
24    }
25}