log4wasm


:sparkles: A rust-generated wasm logging utility with styling capabilities for display in a web console.

Be advised that this crate is still considered experimental however should be stable for use in its current state.

Getting started

You can start using log4wasm by adding the following in your Cargo.toml [dependencies] section:

toml log4wasm = "0.1.2"

Note: log4wasm relies on the wasm-bindgen crate for code-generation therefore it is the current recommended approach for building reliably.

Example

A minimal use-case within your application would look something like the following:

rust fn main() { log4wasm::log!([DEBUG] "logging! {} {}", 1, 3); }

which would then generate the following output in the browser console:

output of generated example log