Files @ 330b9c117fa5
Branch filter:

Location: CSY/reowolf/src/macros.rs - annotation

330b9c117fa5 655 B application/rls-services+xml Show Source Show as Raw Download as Raw
Christopher Esterhuyse
started refactor (safe state). goals: clarify ownership. make cu immutable while round is fallable. distinguish routing from ownership
/*
Change the definition of these macros to control the logging level statically
*/

macro_rules! log {
    (@BENCH, $logger:expr, $($arg:tt)*) => {{
        // if let Some(w) = $logger.line_writer() {
        //     let _ = writeln!(w, $($arg)*);
        // }
    }};
    (@MARK, $logger:expr, $($arg:tt)*) => {{
        if let Some(w) = $logger.line_writer() {
            let _ = writeln!(w, $($arg)*);
        }
    }};
    (@ENDPT, $logger:expr, $($arg:tt)*) => {{
        // ignore
    }};
    ($logger:expr, $($arg:tt)*) => {{
        // if let Some(w) = $logger.line_writer() {
        //     let _ = writeln!(w, $($arg)*);
        // }
    }};
}