log.rs (302B)
1 #[cfg(feature = "logging")] 2 use env_logger; 3 pub use log::debug; 4 pub use log::info; 5 6 pub fn init() { 7 env_logger::init(); 8 } 9 10 #[cfg(not(feature = "logging"))] 11 #[macro_export] 12 macro_rules! info { 13 (*) => {}; 14 } 15 16 #[cfg(not(feature = "logging"))] 17 #[macro_export] 18 macro_rules! debug { 19 (*) => {}; 20 } 21