Skip to content

A logger for the wasm32-unknown-unknown target that prints all messages to the web console

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

scottjmaddox/rust-web-console-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Console Logger

A logger for the wasm32-unknown-unknown target that prints all messages to the web console

Usage

#[macro_use]
extern crate log;
extern crate web_console_logger;
extern crate wasm_bindgen;

use wasm_bindgen::prelude::*;

#[wasm_bindgen]
pub fn main() {
    web_console_logger::init().unwrap();
    // OR
    // web_console_logger::init_with_level(log::Level::Warn).unwrap();

    warn!("This example message will be printed to the web browser's javascript console.");
}

License

Web Console Logger is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Web Console Logger by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

A logger for the wasm32-unknown-unknown target that prints all messages to the web console

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages