logger_debug_assert_eq

Macro logger_debug_assert_eq 

Source
macro_rules! logger_debug_assert_eq {
    ($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 KeyFilter, the rest arguments are like core::debug_assert_eq!().

ยงExamples:

use captains_log::*;
let logger = filter::KeyFilter::new("req_id", format!("{:016x}", 123).to_string());
logger_debug_assert_eq!(logger, 1, 1);
logger_debug_assert_eq!(logger, 1, 1, "impossible things happened: {}", "haha");