# Dev-logger Based on [`env_logger`](https://crates.io/crates/env_logger) but no need to set env. ## Basic ![basic](./basic.svg) [`examples/basic.rs`](examples/basic.rs): ``` rust use dev_logger; #[macro_use] extern crate log; fn main() { dev_logger::init(); function(); } #[test] fn test() { dev_logger::init(); function(); } fn function() { error!("error"); warn!("warn"); info!("info"); debug!("debug"); trace!("trace"); } ``` ## Trace ![trace](./trace.svg) [`examples/trace.rs`](examples/trace.rs): ``` rust use dev_logger; #[macro_use] extern crate log; fn main() { dev_logger::init_trace(); function(); } #[test] fn test() { dev_logger::init_trace(); function(); } fn function() { error!("error"); warn!("warn"); info!("info"); debug!("debug"); trace!("trace"); } ```