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. fatal_if

fatal_if

Macro fatal_if 

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

Emit a fatal level log message using core::fmt format string semantics if condition is true.

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

use log_if::fatal_if;

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