Skip to main content Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. Rust
  4. pw_kernel
  5. log_if
  6. fatalf_if

fatalf_if

Macro fatalf_if 

Source
macro_rules! fatalf_if {
    ($condition:expr, $($args:expr),* $(,)?) => { ... };
}
Expand description

Emit a fatal level log message using printf format string semantics if condition is true.

Note: fatalf only emits a log message and does not cause a panic!()

use log_if::fatalf_if;

const LOG_FACTS: bool = true;
fatalf_if!(LOG_FACTS, "Log Fact: All out of log facts! Timber!");