1pub const YELLOW: &str = "\x1b[33m";
5pub const GREEN: &str = "\x1b[32m";
7pub const RED: &str = "\x1b[31m";
9pub const RESET: &str = "\x1b[0m";
11
12#[macro_export]
16macro_rules! yellow {
17 ($text:expr) => {
18 concat!("\x1b[33m", $text, "\x1b[0m")
19 };
20}
21
22#[macro_export]
24macro_rules! green {
25 ($text:expr) => {
26 concat!("\x1b[32m", $text, "\x1b[0m")
27 };
28}
29
30#[macro_export]
34macro_rules! debug_log {
35 ($debug:expr, $($arg:tt)*) => {
36 if $debug { eprintln!("{}[DEBUG]{} {}", $crate::common::color::YELLOW, $crate::common::color::RESET, format!($($arg)*)); }
37 };
38}
39
40#[macro_export]
42macro_rules! info_log {
43 ($($arg:tt)*) => {
44 eprintln!("{}[INFO]{} {}", $crate::common::color::GREEN, $crate::common::color::RESET, format!($($arg)*));
45 };
46}
47
48#[macro_export]
50macro_rules! warning_log {
51 ($($arg:tt)*) => {
52 eprintln!("{}[WARNING]{} {}", $crate::common::color::YELLOW, $crate::common::color::RESET, format!($($arg)*));
53 };
54}
55
56#[macro_export]
58macro_rules! error_log {
59 ($($arg:tt)*) => {
60 eprintln!("{}[ERROR]{} {}", $crate::common::color::RED, $crate::common::color::RESET, format!($($arg)*));
61 };
62}