#log #logger #logging

lovely_env_logger

a visually lovely env_logger

2 unstable releases

Uses new Rust 2021

0.5.0 May 17, 2022
0.1.0 May 17, 2022

#151 in Debugging

MIT/Apache

14KB
221 lines

lovely-env-logger

Crates.io Docs MIT/APACHE-2.0

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. Originally a fork from pretty_env_logger.

example output

Usage

Add the dependency to your Cargo.toml:

[dependencies]
log = "0.4"
lovely_env_logger = "0.5"

Add some usage to your application:

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

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

~1.2–1.7MB
~44K SLoC