blob: 317cc582bc8d213fcbdb30c78fc473fda79c2e58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
use std::env;
pub fn debug(msg: &str) {
if env::var("ROR_DEBUG").unwrap_or_default() == "1" {
eprintln!("[DEBUG] {}", msg);
}
}
#[macro_export]
macro_rules! debug {
($($arg:tt)*) => {
$crate::debug::debug(&format!($($arg)*));
};
}
|