Skip to main content

rusteal_core/
logging.rs

1pub const LOG_DISPLAY: u8 = 0;
2pub const LOG_WARNING: u8 = 1;
3pub const LOG_ERROR: u8 = 2;
4
5#[macro_export]
6macro_rules! ulog {
7    ($level:expr, $($arg:tt)*) => {{
8        let msg = format!($($arg)*);
9        let bytes = msg.as_bytes();
10
11        unsafe {
12            $crate::ffi_dispatch::logging_log($level, bytes.as_ptr(), bytes.len() as u32);
13        }
14    }};
15}