13 releases

Uses old Rust 2015

0.4.0 Jan 29, 2020
0.3.1 Aug 16, 2019
0.3.0 Dec 6, 2018
0.2.5 Oct 29, 2018
0.1.0 Dec 29, 2016

#14 in Debugging

Download history 24645/week @ 2020-04-13 27287/week @ 2020-04-20 25634/week @ 2020-04-27 26528/week @ 2020-05-04 28880/week @ 2020-05-11 28172/week @ 2020-05-18 28891/week @ 2020-05-25 30336/week @ 2020-06-01 32713/week @ 2020-06-08 28795/week @ 2020-06-15 27141/week @ 2020-06-22 27677/week @ 2020-06-29 29077/week @ 2020-07-06 30089/week @ 2020-07-13 30329/week @ 2020-07-20 27317/week @ 2020-07-27

108,073 downloads per month
Used in 346 crates (294 directly)

MIT/Apache

9KB
115 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=trace cargo run

License

Licensed under either of

Dependencies

~2MB
~47K SLoC