astrox_macros 0.2.7

add user management and canister relation management for canister
Documentation
#[macro_export]
macro_rules! inject_canister_log {
    () => {
        thread_local! {
          pub static LOG: RefCell<Log> = RefCell::new(Log::new());
        }

        use astrox_macros::log::{Log, LogEntry};

        pub fn log_add(ts: u64, log: String)  {
            LOG.with(|s| s.borrow_mut().log_add(ts, log));
        }

        pub fn log_list_between(from_ts: u64, to_ts: u64) -> Vec<LogEntry>  {
            REGISTRY.with(|s| s.borrow().log_list_between(from_ts, to_ts))
        }

        pub fn log_list_after(after_ts: u64) -> Vec<LogEntry>  {
            REGISTRY.with(|s| s.borrow().log_list_after(after_ts))
        }

        pub fn log_clear(before_ts: u64) {
            REGISTRY.with(|s| s.borrow_mut().log_clear(before_ts));
        }
    };
}