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 9f071a9 commit d8728b3Copy full SHA for d8728b3
rust/src/lib.rs
@@ -26,7 +26,6 @@ pub(crate) mod common_generated {
26
}
27
28
pub mod client_api;
29
-#[cfg(feature = "contract")]
30
pub mod log;
31
#[cfg(feature = "contract")]
32
pub mod rand;
rust/src/log.rs
@@ -1,3 +1,13 @@
1
+#[macro_export]
2
+macro_rules! info {
3
+ ($($arg:tt)*) => {
4
+ #[cfg(not(feature = "contract"))]
5
+ tracing::info!($($arg)*);
6
+ #[cfg(feature = "contract")]
7
+ ::freenet_stdlib::log::info(&format!($($arg)*));
8
+ };
9
+}
10
+
11
pub fn info(msg: &str) {
12
let ptr = msg.as_ptr() as _;
13
unsafe {
0 commit comments