hawk_cli/
log.rs

1use colored::*;
2
3pub fn warn(message: &str) {
4    println!("[{}] {}", "WARN".yellow().bold(), message)
5}
6
7pub fn error<E: std::fmt::Debug>(message: &str, err: E) {
8    println!(
9        "[{}] {} {:?}",
10        "ERROR".white().on_red().bold(),
11        message,
12        err
13    )
14}
15
16// TODO: write a custom macro and wrap the default `dbg!()` behaviour.