We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38b48f0 commit 515ba77Copy full SHA for 515ba77
rust/src/log.rs
@@ -1,10 +1,10 @@
1
#[macro_export]
2
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)*));
+ ($($arg:tt)*) => {
+ #[cfg(not(feature = "contract"))]
+ tracing::info!($($arg)*);
+ #[cfg(feature = "contract")]
+ info(&format!($($arg)*));
8
};
9
}
10
@@ -15,6 +15,7 @@ pub fn info(msg: &str) {
15
16
17
18
+
19
#[link(wasm_import_module = "freenet_log")]
20
extern "C" {
21
#[doc(hidden)]
@@ -29,4 +30,5 @@ fn log_non_contract() {
29
30
.with_max_level(LevelFilter::INFO)
31
.init();
32
info!("n={}, y={:?}", 1, 2);
33
+ info!("zk");
34
0 commit comments