Crates.io | femme |
lib.rs | femme |
version | 2.2.1 |
source | src |
created_at | 2019-07-19 18:22:27.079281 |
updated_at | 2022-05-09 15:06:53.950807 |
description | Not just a pretty (inter)face: pretty-printer and ndjson logger for log crate. |
homepage | |
repository | https://github.com/lrlna/femme |
max_upload_size | |
id | 150184 |
size | 601,554 |
Not just a pretty (inter)face.
A pretty-printer and ndjson logger for the log crate.
use kv_log_macro as log;
femme::with_level(femme::LevelFilter::Trace);
log::warn!("Unauthorized access attempt on /login");
log::info!("Listening on port 8080");
Prettified output will be displayed when debugging. In release mode, this logger will output to ndjson.
When using Wasm with #[cfg(target_arch = "wasm32")]
, Wasm logger will be used.
Wasm logger uses web_sys
crate to send console.log()
to JavaScript.
$ cargo add femme
MIT OR Apache-2.0