macro_rules! log {
($level:expr, $($arg:tt)+) => { ... };
}Expand description
Logs a message at the given level.
This is the core logging macro. All level-specific macros delegate to it.
The macro references a bare __log_prefix!() which resolves at
the call site via Rust’s textual macro scoping.
The prefix is passed as a separate field on the Record
rather than concatenated into the format string,
so implicit format captures (info!("{var}")) work normally.
§Examples
ⓘ
use ostd::log::Level;
ostd::log!(Level::Warning, "unsupported");
ostd::log!(Level::Info, "value = {}", x);
ostd::log!(Level::Debug, "{name} started");