mod logger;
use logger::{log, AnsiColors, Level};
fn main() {
log("Hello, world!".to_string())
.timestamp()
.code(42)
.info()
.print();
log("Something went wrong".to_string())
.code(404)
.error()
.print();
log("Custom time format".to_string())
.timestamp_format("%H:%M:%S")
.debug()
.print();
log("No colors here".to_string())
.no_color()
.warn()
.print();
let mut custom = AnsiColors::default();
custom.info = "\x1b[35m".to_string(); custom.warn = "\x1b[36m".to_string();
log("Custom color config".to_string())
.colors(custom)
.info()
.print();
log("Only ERROR is white on red".to_string())
.color_for_level(Level::Error, "\x1b[97;41m")
.error()
.print();
}