initial commit

This commit is contained in:
lisk77 2024-10-26 02:15:26 +02:00
commit 6154c72b0e
55 changed files with 9481 additions and 0 deletions

View file

@ -0,0 +1,8 @@
[package]
name = "comet_log"
version = "0.1.0"
edition = "2021"
[dependencies]
chrono = "0.4"
colored = "2.0"

View file

@ -0,0 +1,47 @@
#[macro_export]
macro_rules! info {
($msg:expr) => {
println!(
"{} {} : {}",
chrono::Local::now().format("%Y-%m-%d %H:%M:%S"),
"\x1b[32m\x1b[1mINFO\x1b[0m",
$msg
);
};
}
#[macro_export]
macro_rules! debug {
($msg:expr) => {
println!(
"{} {} : {}",
chrono::Local::now().format("%Y-%m-%d %H:%M:%S"),
"\x1b[34m\x1b[1mDEBUG\x1b[0m",
$msg
);
};
}
#[macro_export]
macro_rules! warn {
($msg:expr) => {
println!(
"{} {} : {}",
chrono::Local::now().format("%Y-%m-%d %H:%M:%S"),
"\x1b[33m\x1b[1mWARNING\x1b[0m",
$msg
);
};
}
#[macro_export]
macro_rules! error {
($msg:expr) => {
println!(
"{} {} : {}",
chrono::Local::now().format("%Y-%m-%d %H:%M:%S"),
"\x1b[31m\x1b[1mERROR\x1b[0m",
$msg
);
};
}