lovely-env-logger

Crates.io Docs MIT/APACHE-2.0

A simple logger built on top of envlogger. It is configured via an environment variable and writes to standard error with nice colored output for log levels. Originally a fork from prettyenv_logger.

Screenshots

example default output example output with relative timestamps, short
levels example output with system timestamps, file names and line numbers

Usage

Add the dependency to your Cargo.toml:

toml [dependencies] log = "0.4" lovely_env_logger = "0.6"

Add some usage to your application:

```rust extern crate lovelyenvlogger;

[macro_use] extern crate log;

fn main() { lovelyenvlogger::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