Skip to main content

log

Macro log 

Source
macro_rules! log {
    ($level:expr, $msg:expr) => { ... };
    ($level:expr, $msg:expr, $a:expr) => { ... };
    ($level:expr, $msg:expr, $a:expr, $b:expr) => { ... };
}
Expand description

Log a message at the given level. ISR-safe: pushing a frame does no formatting and never blocks (see the module docs for why arguments are a small closed set — u32/i32/f32/&'static str — rather than a full format_args!-style template). Up to two {} placeholders in $msg are substituted, in order, at drain time:

rivet::log!(Level::Info, "task {} spawned", id);
rivet::log!(Level::Warn, "retry {}/{}", attempt, max);