1
0
Fork 0
forked from koniifer/ableos

logging macros

This commit is contained in:
elfein727 2021-12-24 01:39:24 -08:00
parent c8455f9352
commit 37daece60a

View file

@ -22,3 +22,31 @@ impl Log for ANSISerialLogger {
todo!(); todo!();
} }
} }
#[macro_export]
macro_rules! debug {
($($arg:tt)*) => ({
log::ANSISerialLogger::debug(&format!($($arg)*));
})
}
#[macro_export]
macro_rules! error {
($($arg:tt)*) => ({
log::ANSISerialLogger::error(&format!($($arg)*));
})
}
#[macro_export]
macro_rules! info {
($($arg:tt)*) => ({
log::ANSISerialLogger::info(&format!($($arg)*));
})
}
#[macro_export]
macro_rules! trace {
($($arg:tt)*) => ({
log::ANSISerialLogger::trace(&format!($($arg)*));
})
}