1#[macro_export]
6macro_rules! rakrs_debug {
7 ($heavy: ident, $($t: tt)*) => {
8 if cfg!(feature="debug") && cfg!(feature="debug_all") {
9 println!("[rakrs] DBG! {}", format!($($t)*));
10 }
11 };
12 ($($t: tt)*) => {
13 if cfg!(feature="debug") {
14 println!("[rakrs] DBG! {}", format!($($t)*));
15 }
16 };
17}
18
19#[macro_export]
20macro_rules! rakrs_debug_buffers {
21 ($server: literal, $($t: tt)*) => {
22 if cfg!(feature="debug_buffers") {
23 let x = if $server == true { "S -> C" } else { "C -> S" };
24 println!("[rakrs] DBG [{}]: {}", x, format!($($t)*));
25 }
26 };
27}