2 unstable releases

Uses old Rust 2015

0.2.0 Aug 1, 2019
0.1.0 May 11, 2018

#5 in #webasm

Download history 170/week @ 2024-04-10 199/week @ 2024-04-17 204/week @ 2024-04-24 170/week @ 2024-05-01 169/week @ 2024-05-08 158/week @ 2024-05-15 157/week @ 2024-05-22 186/week @ 2024-05-29 138/week @ 2024-06-05 126/week @ 2024-06-12 153/week @ 2024-06-19 128/week @ 2024-06-26 5/week @ 2024-07-03 118/week @ 2024-07-10 169/week @ 2024-07-17 118/week @ 2024-07-24

411 downloads per month
Used in 3 crates

MIT/Apache

5KB
74 lines

web_logger

Implements a logger that can be used in web browsers.

Usage

In libraries

Not required. Libraries should use the log crate instead.

In executables

It must be added along with log to the project dependencies:

[dependencies]
log = "0.4"
web_logger = "0.1"

web_logger must be initialized as early as possible in the project. After it's initialized, you can use the log macros to do actual logging.

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

fn main() {
    web_logger::init();

    info!("starting up");

    // ...
}

lib.rs:

A logger that prints all messages in browser's console.

Dependencies

~3.5MB
~75K SLoC