refactored cli and logging
All checks were successful
Test the running changes / Test (push) Successful in 41s

This commit is contained in:
2025-11-21 01:37:19 +02:00
parent f68b1bb276
commit 1aa6af3b1a
10 changed files with 259 additions and 123 deletions

View File

@@ -30,13 +30,16 @@ impl Display for Level {
#[macro_export]
macro_rules! log {
($level:expr, $($arg:tt)*) => {{
let log_from = if &$level == &$crate::Level::Debug {
format!(" {}:{}", std::file!(), std::line!())
} else {
String::new()
};
if &$level <= $crate::LOG_LEVEL.get().unwrap_or(&$crate::Level::Info) {
println!(
"{} {}:{}:{}: {}",
"{}{}: {}",
$level,
std::module_path!(),
std::file!(),
std::line!(),
log_from,
format!($($arg)*)
);
}