macro_rules! debug_if {
($condition:expr, $($args:expr),* $(,)?) => { ... };
}Expand description
Emit a debug level log message using core:fmt format string semantics if condition
is true.
use log_if::debug_if;
const LOG_FACTS: bool = true;
debug_if!(LOG_FACTS, "Log Fact: The American toy Lincoln Logs were inspired by the {} in {}.",
"Imperial Hotel" as &str, "Tokyo" as &str);