#pretty-printer #log #logger #ndjson #femme

femme

Not just a pretty (inter)face: pretty-printer and ndjson logger for log crate

8 stable releases

2.1.2 Dec 4, 2020
2.1.1 Aug 10, 2020
2.1.0 May 25, 2020
1.3.0 Oct 4, 2019
1.1.0 Jul 20, 2019

#33 in Debugging

Download history 7125/week @ 2021-01-21 7365/week @ 2021-01-28 7101/week @ 2021-02-04 6697/week @ 2021-02-11 7209/week @ 2021-02-18 6172/week @ 2021-02-25 6366/week @ 2021-03-04 7464/week @ 2021-03-11 7137/week @ 2021-03-18 7901/week @ 2021-03-25 6516/week @ 2021-04-01 7425/week @ 2021-04-08 5987/week @ 2021-04-15 6207/week @ 2021-04-22 6295/week @ 2021-04-29 6469/week @ 2021-05-06

29,117 downloads per month
Used in 35 crates (28 directly)

MIT/Apache

570KB
209 lines

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

Dependencies

~1–3.5MB
~73K SLoC