macro_rules! logger_debug_assert {
($log_filter:expr, $($arg:tt)*) => { ... };
}Expand description
On debug build, will log with log_filter and panic when condition not met. Skip the check on release build.
The first argument is LogFilter or LogFilterKV, the rest arguments are like core::debug_assert!().
ยงExamples:
use captains_log::*;
let logger = filter::LogFilterKV::new("req_id", format!("{:016x}", 123).to_string());
let started = true;
logger_debug_assert!(logger, started);
logger_debug_assert!(logger, started, "job must have been started");