wasm-bindgen-console-logger
This small utility crate integrates the log
crate with the JavaScript console logging functions with the help of
wasm-bindgen
.
```rust use log::{error, info, warn}; use wasmbindgen::prelude::*; use wasmbindgenconsolelogger::DEFAULT_LOGGER;
pub fn start() { log::setlogger(&DEFAULTLOGGER).unwrap(); log::setmaxlevel(log::LevelFilter::Info);
error!("Error message");
warn!("Warning message");
info!("Informational message");
} ```