rovella_logger 0.1.3

A simple logger that is used by the rovella game library (the rest of the library is still in developement)
Documentation

The Rovella Logger

This is a simple low overhead logger than uses eprintln and println with format to log text and other data.

Examples

The fatal macro is shown below and the other macros follow this pattern

macro_rules! log_fatal {
    ($($args:tt)*) => {
        eprintln!("\x1b[1;92m{} \x1b[30;41m[FATAL]: {} \x1b[0m",
            format!("[{}:{}]", file!(), line!()),
            format!($($args)*),
        );
    };
}

The macro can be used just like println but it gives some extra info (along with color)

#[macro_use]
extern crate rovella_logger;
...

log_fatal!("Fatal error with code: {}", 4); // output => [src\main.rs:2] [FATAL]: Fatal error with code: 4 
log_fatal!("Fatal");                        // output => [src\main.rs:3] [FATAL]: Fatal