summaryrefslogtreecommitdiff
path: root/WebInterface/wasm/asm-paint/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'WebInterface/wasm/asm-paint/src/lib.rs')
-rw-r--r--WebInterface/wasm/asm-paint/src/lib.rs20
1 files changed, 6 insertions, 14 deletions
diff --git a/WebInterface/wasm/asm-paint/src/lib.rs b/WebInterface/wasm/asm-paint/src/lib.rs
index b6a5840..fea9d0f 100644
--- a/WebInterface/wasm/asm-paint/src/lib.rs
+++ b/WebInterface/wasm/asm-paint/src/lib.rs
@@ -1,21 +1,13 @@
-use wasm_bindgen::prelude::*;
-
-macro_rules! console_log {
- ($($t:tt)*) => (log(&format_args!($($t)*).to_string()))
-}
+mod client_logger;
-#[wasm_bindgen]
-extern "C" {
- #[wasm_bindgen(js_namespace = console)]
- fn log(s: &str);
+use wasm_bindgen::prelude::*;
- #[wasm_bindgen(js_namespace = document)]
- fn write(s: &str);
-}
+#[macro_use]
+extern crate log;
#[wasm_bindgen(start)]
pub fn entry() {
- console_log!("hello {} wasm", 44);
+ client_logger::init_logger();
- write("gooo");
+ info!("{}", 42);
}