Files @ ef64fd0cdb07
Branch filter:

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

ef64fd0cdb07 484 B application/rls-services+xml Show Source Show as Raw Download as Raw
Christopher Esterhuyse
correctly merging protocol component branches: forks that create existing predicates MERGE the results, combining their inboxes s.t. there is no race condition on the order of received messages
/*
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)*);
        }
    }};
}