1 stable release
1.0.1 | Dec 12, 2021 |
---|---|
1.0.0 |
|
#661 in WebAssembly
Used in 3 crates
(2 directly)
10KB
217 lines
web-log
Minimal wrapper over browser console to provide printing facilities
Features:
std
- Enablesstd::io::Write
implementation.
Usage
use web_log::{ConsoleType, Console};
use core::fmt::Write;
let mut writer = Console::new(ConsoleType::Info);
let _ = write!(writer, "Hellow World!");
drop(writer); //or writer.flush();
web_log::println!("Hello via macro!");
web_log::eprintln!("Error via macro!");
lib.rs
:
Minimal wrapper over browser console to provide printing facilities
Features:
std
- Enablesstd::io::Write
implementation.
Usage
use web_log::{ConsoleType, Console};
use core::fmt::Write;
let mut writer = Console::new(ConsoleType::Info);
let _ = write!(writer, "Hellow World!");
drop(writer); //or writer.flush();
web_log::println!("Hello via macro!");
web_log::eprintln!("Error via macro!");
Dependencies
~0.7–1.4MB
~28K SLoC