macro_rules! warn_if {
($condition:expr, $($args:expr),* $(,)?) => { ... };
}Expand description
Emit a warn level log message using core::fmt format string semantics if condition is true.
use log_if::warn_if;
const LOG_FACTS: bool = true;
warn_if!(
LOG_FACTS,
"Log Fact: Made from a log, an {} year old dugout canoe is the oldest discovered boat in {}.",
8000 as i32, "Africa" as &str);