2 unstable releases

Uses old Rust 2015

0.2.0 Aug 1, 2019
0.1.0 May 11, 2018

#7 in #webasm

Download history 152/week @ 2024-07-21 146/week @ 2024-07-28 137/week @ 2024-08-04 189/week @ 2024-08-11 129/week @ 2024-08-18 172/week @ 2024-08-25 150/week @ 2024-09-01 114/week @ 2024-09-08 116/week @ 2024-09-15 180/week @ 2024-09-22 166/week @ 2024-09-29 29/week @ 2024-10-06 86/week @ 2024-10-13 92/week @ 2024-10-20 119/week @ 2024-10-27 119/week @ 2024-11-03

417 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
~76K SLoC