macro_rules! log {
($($arg:tt)*) => { ... };
}Expand description
A logging macro that prints the value to stdout, with a newline.
This macro is a more gas-efficient alternative to regular println! statements. It evaluates the given expression and writes its display representation to standard output, followed by a newline.
§Examples
let value = 42;
log!("{}", value); // Prints: 42\n
log!("The answer is: {}", value); // Prints: The answer is: 42\n§Notes
This macro requires that the expression’s type implements the Display trait.