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"); }