aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/macros.rs
blob: fe262b4d0cb9188fb878a0f69ae9847e18ab06ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#[macro_export]
macro_rules! logln {
    ($($arg:tt)*) => {
        crate::log::write_fmt(format_args!($($arg)*), true);
    };
    (_) => {};
}

#[macro_export]
macro_rules! log {
    ($($arg:tt)*) => {
        crate::log::write_fmt(format_args!($($arg)*), false);
    };
    (_) => {};
}

#[macro_export]
macro_rules! logln_now {
    ($($arg:tt)*) => {
        unsafe {crate::log::write_fmt_now(format_args!($($arg)*), true);}
    };
    (_) => {};
}

#[macro_export]
macro_rules! log_now {
    ($($arg:tt)*) => {
        unsafe {crate::log::write_fmt_now(format_args!($($arg)*), false);}
    };
    (_) => {};
}