#log #logger #logging

emoji-logger

pretty_env_logger but it has emojis and is probably quite a bit worse

1 unstable release

0.1.0 Oct 7, 2018

#36 in #logger

Download history 9/week @ 2018-10-10

3 downloads per month

MIT license

7KB
88 lines

Emoji Logger 😋

oh no

[dependencies]
emoji-logger = "0.1.0"

What

With groundbreaking computer science, we have managed to bring emojis to your system logs!

Just

extern crate emoji_logger;
// ...
emoji_logger::init();

and emoji away!

Why

Someone had to do it. If you have issues or suggestions, open an issue.

Thank you Sean McArthur for pretty_env_log, which this is based on.


lib.rs:

A logger configured via an environment variable which writes cancer to standard error with colored output for log levels.

Example

extern crate emoji_logger;
#[macro_use] extern crate log;

fn main() {
    emoji_logger::init();

    trace!("this is trace level");
    debug!("mom get the rubber duck");
    info!("heck, our disk is full of logs again...");
    warn!("should we worry");
    error!("pls help");
}

Dependencies

~3MB
~44K SLoC