cj-femme

Crates.iocj-femme
lib.rscj-femme
version2.2.3
sourcesrc
created_at2023-10-05 16:57:56.524511
updated_at2023-10-05 18:46:11.717188
descriptionNot just a pretty (inter)face: pretty-printer and ndjson logger for log crate.
homepage
repositoryhttps://github.com/lrlna/femme
max_upload_size
id994358
size598,021
Ivan Porto Carrero (casualjim)

documentation

https://docs.rs/femme

README

femme

crates.io version build status downloads docs.rs docs

Not just a pretty (inter)face.

A pretty-printer and ndjson logger for the log crate.

Examples

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.

Screenshots

Pretty Output

pretty printed logs

Newline Delimited JSON

ndjson

Installation

$ cargo add femme

License

MIT OR Apache-2.0

Commit count: 59

cargo fmt