#log #logger #logging

pretty_env_logger

a visually pretty env_logger

9 releases

0.2.4 Jul 11, 2018
0.2.3 May 11, 2018
0.2.2 Feb 8, 2018
0.2.0 Jan 20, 2018
0.1.0 Dec 29, 2016

#13 in Debugging

Download history 1274/week @ 2018-05-06 1379/week @ 2018-05-13 1212/week @ 2018-05-20 1210/week @ 2018-05-27 1307/week @ 2018-06-03 1561/week @ 2018-06-10 1521/week @ 2018-06-17 1589/week @ 2018-06-24 1518/week @ 2018-07-01 2281/week @ 2018-07-08 2316/week @ 2018-07-15 1757/week @ 2018-07-22 1402/week @ 2018-07-29

6,540 downloads per month

pretty-env-logger

Crates.io Docs MIT/APACHE-2.0 Travis CI AppVeyor

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.2"

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

MIT/Apache-2.0 license

Dependencies

Reverse deps