#ndjson #log #logger #logging #pretty-print #debugging-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

#151 in Debugging

Download history 30193/week @ 2024-07-27 32638/week @ 2024-08-03 43018/week @ 2024-08-10 28965/week @ 2024-08-17 39201/week @ 2024-08-24 41237/week @ 2024-08-31 39514/week @ 2024-09-07 35802/week @ 2024-09-14 39429/week @ 2024-09-21 38110/week @ 2024-09-28 42746/week @ 2024-10-05 42944/week @ 2024-10-12 47195/week @ 2024-10-19 37932/week @ 2024-10-26 46945/week @ 2024-11-02 38664/week @ 2024-11-09

177,070 downloads per month
Used in fewer than 40 crates

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–4MB
~82K SLoC