debug

Macro debug 

Source
macro_rules! debug {
    ($($e:expr),*) => { ... };
    (from $o:expr, $($e:expr),*) => { ... };
    (from $o:expr, when $call:expr, $($e:expr),*) => { ... };
}
Expand description

Logs a debug message.

use iceoryx2_bb_log::debug;

#[derive(Debug)]
struct MyDataType {}

impl MyDataType {
    fn something_that_fails(&self) -> Result<(), ()> {
        Err(())
    }

    fn doIt(&self) {
        debug!("Only a message");
        debug!(from self, "Message which adds the object as its origin");
        debug!(from "Somewhere over the Rainbow", "Message with custom origin");

        debug!(from self, when self.something_that_fails(),
            "Print only when result.is_err()")
    }
}