1 2 3 4 5 6 7 8 9 10 11
#[macro_export] macro_rules! debug_print { ($($arg:tt)*) => { #[cfg(debug_assertions)] { if std::env::var("DEBUG_LOG").is_ok() { println!("[DEBUG] [{}:{}] {}", file!(), line!(), format_args!($($arg)*)); } } }; }