use dev_logger; #[macro_use] extern crate log; fn main() { dev_logger::init_info(); function(); } #[test] fn test() { dev_logger::init_info(); function(); } fn function() { error!("error"); warn!("warn"); info!("info"); debug!("debug"); trace!("trace"); }