macro_rules! log { ($($arg:tt)*) => { ... }; }
Expand description
Helper macro to log a message through env::log_str.
This macro can be used similar to the std::format macro.
This differs from std::format because instead of generating a string, it will log the utf8
bytes as a log through env::log_str.
The logged message will get persisted on chain.
§Example use
use unc_sdk::log;
log!("test");
let world: &str = "world";
log!("{world}");
log!("Hello {}", world);
log!("x = {}, y = {y}", 10, y = 30);