#ndjson #log #logger #pretty-printer #logging

femme

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

10 stable releases

2.2.1 May 9, 2022
2.2.0 Apr 5, 2022
2.1.2 Dec 4, 2020
2.1.1 Aug 10, 2020
1.1.0 Jul 20, 2019

#94 in Debugging

Download history 32312/week @ 2023-11-21 32530/week @ 2023-11-28 29532/week @ 2023-12-05 25869/week @ 2023-12-12 20207/week @ 2023-12-19 8962/week @ 2023-12-26 20158/week @ 2024-01-02 26238/week @ 2024-01-09 29932/week @ 2024-01-16 27191/week @ 2024-01-23 25530/week @ 2024-01-30 27085/week @ 2024-02-06 29871/week @ 2024-02-13 32962/week @ 2024-02-20 31526/week @ 2024-02-27 22736/week @ 2024-03-05

123,537 downloads per month
Used in 50 crates (38 directly)

MIT/Apache

570KB
218 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
~77K SLoC