styled_env_logger

Crates.iostyled_env_logger
lib.rsstyled_env_logger
version0.1.2
sourcesrc
created_at2023-01-10 17:24:08.224761
updated_at2023-01-15 11:47:55.598385
descriptionAn updated version of `pretty-env-logger`
homepage
repositoryhttps://github.com/snowdroppm/snowdrop/tree/main/crates/styled-env-logger
max_upload_size
id755700
size29,612
(SkyfallWasTaken)

documentation

README

styled-env-logger

Crates.io Docs MIT/APACHE-2.0

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.

example output

Usage

Add the dependency to your Cargo.toml:

[dependencies]
log = "0.4"
styled_env_logger = "0.1"

Add some usage to your application:

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

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

Credit

All credit goes to @seanmonstar, I just updated the env_logger version.

License

Licensed under either of

Commit count: 35

cargo fmt