#wasm #logger #front-end

wasm-logger

A simple logger for wasm front-end app written in Rust

1 unstable release

0.1.0 Oct 4, 2018

#36 in #logger

Download history 9/week @ 2018-10-10

3 downloads per month

MIT/Apache

4KB
63 lines

A simple logger for front-end wasm web app

Cargo.toml

[dependencies]
log = "0.4"
wasm-logger = "0.1.0"

In your app:

#[macro_use]
extern crate log;
extern crate wasm_logger;

Initialize wasm-logger when your app start:

wasm_logger::init(wasm_logger::Config::new(log::Level::Debug));

License

MIT


lib.rs:

A simple logger for front end wasm web app.

For more information about how to use loggers in Rust, see log.

    #[macro_use]
    extern crate log;
    extern crate wasm_logger;

Add the following line to the initialization code of your app:

    wasm_logger::init(wasm_logger::Config::new(log::Level::Debug));

Dependencies

~3MB
~51K SLoC