This is a fork of pretty_env_logger
.
A simple logger built on top of env_logger.
It is configured via an environment variable and writes to standard
error with nice colored output for log levels.
Add the dependency to your Cargo.toml
:
toml
[dependencies]
log = "0.4"
styled_env_logger = "0.1"
Add some usage to your application:
```rust extern crate styledenvlogger;
fn main() { styledenvlogger::init(); info!("such information"); warn!("o_O"); error!("much error"); } ```
Then run your app with the environmental variable set:
env
RUST_LOG=trace cargo run
All credit goes to @seanmonstar, I just updated the env_logger
version.
Licensed under either of