1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
macro_rules! debug {
    ($fmt:expr $(,$x:expr)* ) => {
        { let _ = ($($x,)*); }
        //println!(concat!("DEBUG {}:{} ", $fmt), file!(), line!() $(,$x)* );
    }
}
macro_rules! warn {
    ($fmt:expr $(,$x:expr)* ) => {
        { let _ = ($($x,)*); }
        println!(concat!("WARN {}:{} ", $fmt), file!(), line!() $(,$x)* );
    }
}
macro_rules! error {
    ($fmt:expr $(,$x:expr)* ) => {
        { let _ = ($($x,)*); }
        println!(concat!("ERROR {}:{} ", $fmt), file!(), line!() $(,$x)* );
    }
}