Skip to main content

log_nonfatal

Macro log_nonfatal 

Source
macro_rules! log_nonfatal {
    ($result:expr, $($args:tt)*) => { ... };
}
Expand description

Log a non-fatal error at WARN and continue.

Expands to if let Err(e) = … { tracing::warn!(error = %e, …) }. The injected error = %e binding is the only thing the macro adds itself; callers pass any additional structured fields and the message literal verbatim. tracing accepts fields in any order before the message, so the injected error = %e is valid whether the caller adds fields or only a context string.