rovella_logger 0.1.4

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

The Rovella Logger

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


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!()),

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

extern crate rovella_logger;

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

Macros with a security level below error don't compile to anything in release mode

extern crate rovella_logger;

log_warn!("I'm only in debug mode {}", 4); // output => ...
log_info!("I'm only in deubg mode");       // output => ...