macro_rules! __msg {
($msg:expr) => { ... };
($($arg:tt)*) => { ... };
}Expand description
Print a message to the log.
Supports simple strings as well as Rust format strings. When passed a
single expression it will be passed directly to atlas_log. The expression
must have type &str, and is typically used for logging static strings.
When passed something other than an expression, particularly
a sequence of expressions, the tokens will be passed through the
format! macro before being logged with atlas_log.
Note that Rust’s formatting machinery is relatively CPU-intensive for constrained environments like the Atlas VM.
§Examples
use atlas_msg::msg;
// The fast form
msg!("verifying multisig");
// With formatting
let err = "not enough signers";
msg!("multisig failed: {}", err);