12 releases

0.3.1 Aug 16, 2019
0.3.0 Dec 6, 2018
0.2.5 Oct 29, 2018
0.2.4 Jul 11, 2018
0.1.0 Dec 29, 2016

#15 in Debugging

Download history 8769/week @ 2019-05-03 9875/week @ 2019-05-10 10399/week @ 2019-05-17 11135/week @ 2019-05-24 13105/week @ 2019-05-31 11719/week @ 2019-06-07 11204/week @ 2019-06-14 13897/week @ 2019-06-21 11426/week @ 2019-06-28 10119/week @ 2019-07-05 10797/week @ 2019-07-12 12092/week @ 2019-07-19 12872/week @ 2019-07-26 12955/week @ 2019-08-02 14679/week @ 2019-08-09

51,972 downloads per month
Used in 206 crates (171 directly)

MIT/Apache

10KB
100 lines

pretty-env-logger

Crates.io Docs MIT/APACHE-2.0 Travis CI

A simple logger built on top off env_logger. It is configured via an environment variable and writes to standard error with nice colored output for log levels.

example output

Usage

Add the dependency to your Cargo.toml:

[dependencies]
log = "0.4"
pretty_env_logger = "0.3"

Add some usage to your application:

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

fn main() {
    pretty_env_logger::init();
    info!("such information");
    warn!("o_O");
    error!("much error");
}

Then run your app with the environmental variable set:

RUST_LOG=myapp=trace cargo run

License

Licensed under either of

Dependencies

~2.5MB
~59K SLoC