usc 1.20230730.1349

A common lib for unitedservices
Documentation


#[macro_export]
macro_rules! mylog {
    () => {
        eprint!("[{}][{}:{}]", chrono::Local::now().format("%Y-%m-%d %H:%M:%S"),file!(), line!())
    };
    ( $( $x:expr ),* ) => {
        {
            eprint!("[{}]【", chrono::Local::now().format("%Y-%m-%d %H:%M:%S"));
            $(
                eprint!("{:?}: ",$x);
            )*
            eprintln!("】[{}:{}]",file!(), line!())
        }
    };
}

#[macro_export]
macro_rules! mydbg {
    () => {
        eprint!("[{}][{}:{}]", chrono::Local::now().format("%Y-%m-%d %H:%M:%S"),file!(), line!())
    };
    ( $( $x:expr ),* ) => {
        {
            eprint!("[{}]【", chrono::Local::now().format("%Y-%m-%d %H:%M:%S"));
            $(
                eprint!("{}: ",$x);
            )*
            eprintln!("】[{}:{}]",file!(), line!())
        }
    };
}