wasm-bindgen-console-logger

This small utility crate integrates the log crate with the JavaScript console logging functions with the help of wasm-bindgen.

Example

```rust use log::{error, info, warn}; use wasmbindgen::prelude::*; use wasmbindgenconsolelogger::DEFAULT_LOGGER;

[wasm_bindgen]

pub fn start() { log::setlogger(&DEFAULTLOGGER).unwrap(); log::setmaxlevel(log::LevelFilter::Info);

error!("Error message");
warn!("Warning message");
info!("Informational message");

} ```

Related libraries

By sheer coincidence, this crate was published at almost exactly the same time as console_log. Assuming that it receives continued maintenance, console_log may end up being the "go-to" option for logging in WebAssembly applications, but I'm planning to provide at least basic maintenance on this crate until the situation becomes clearer.