Skip to content

Commit 515ba77

Browse files
ple1niduartgomez
authored andcommitted
fix
1 parent 38b48f0 commit 515ba77

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

rust/src/log.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#[macro_export]
22
macro_rules! info {
3-
($fmt:expr, $($args:tt)*) => {
4-
#[cfg(not(feature="contract"))]
5-
tracing::info!($fmt, $($args)*);
6-
#[cfg(feature="contract")]
7-
info(&format!($fmt, $($args)*));
3+
($($arg:tt)*) => {
4+
#[cfg(not(feature = "contract"))]
5+
tracing::info!($($arg)*);
6+
#[cfg(feature = "contract")]
7+
info(&format!($($arg)*));
88
};
99
}
1010

@@ -15,6 +15,7 @@ pub fn info(msg: &str) {
1515
}
1616
}
1717

18+
1819
#[link(wasm_import_module = "freenet_log")]
1920
extern "C" {
2021
#[doc(hidden)]
@@ -29,4 +30,5 @@ fn log_non_contract() {
2930
.with_max_level(LevelFilter::INFO)
3031
.init();
3132
info!("n={}, y={:?}", 1, 2);
33+
info!("zk");
3234
}

0 commit comments

Comments
 (0)