Morgan
is a light weight implementation on top of the log crate.
Instead of showing the current time in the log, it shows the time since application startup in seconds.
Run:
git submodule add [email protected]:lholznagel/morgan.git
Cargo.toml:
morgan = { path = "../morgan" }
Code:
use morgan::Morgan;
fn main() {
Morgan::init(Vec::new()); // or vec!["dependency_to_ignore_logs_from"]
log::error!("My error message");
log::warn!("My warn message");
log::info!("My info message");
log::debug!("Will not be shown");
log::trace!("Will not be shown");
}
- Log level:
INFO
- Color output:
true
- Crates excluded:
[]
- To add some go to lib.rs
MORGAN_LEVEL=debug
changes the log level to debugMORGAN_COLOR=false
disables color output