Files @ 27ba74fbac9f
Branch filter:

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

27ba74fbac9f 484 B application/rls-services+xml Show Source Show as Raw Download as Raw
Christopher Esterhuyse
made the (static) logging more modular in preparation for benchmarking
/*
Change the definition of these macros to control the logging level statically
*/

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