summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/br.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/bin/br.rs b/src/bin/br.rs
index e96df54..ed101de 100644
--- a/src/bin/br.rs
+++ b/src/bin/br.rs
@@ -6,16 +6,24 @@ use std::io::{Read, Write};
use std::path::{Path, PathBuf};
+const NORMAL: &str = "\x1b[0m";
+const BOLD: &str = "\x1b[1m";
+const WHITE: &str = "\x1b[37m";
+const RED: &str = "\x1b[31m";
+const BLUE: &str = "\x1b[34m";
+
static mut VERBOSE: bool = false;
macro_rules! verbose {
($($tokens:tt)*) => { if unsafe { VERBOSE } {
- eprint!("[INFO] "); eprintln!($($tokens)*);
+ eprint!("{BOLD}{BLUE}[INFO]: {WHITE}"); eprint!($($tokens)*);
+ eprintln!("{NORMAL}");
} };
}
macro_rules! error {
($($tokens:tt)*) => {{
- eprint!("[ERROR] "); eprintln!($($tokens)*); std::process::exit(1);
+ eprint!("{BOLD}{RED}[ERROR]: {WHITE}"); eprint!($($tokens)*);
+ eprintln!("{NORMAL}"); std::process::exit(1);
}};
}