#log #logger #logging #env-logger

emoji-logger

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

1 unstable release

Uses old Rust 2015

0.1.0 Oct 7, 2018

#27 in #env-logger

MIT license

8KB
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

~2–10MB
~99K SLoC