refactor: streamline config handling and logging mechanisms

This commit is contained in:
Tunglies
2025-11-15 02:46:34 +08:00
parent f6f288f02b
commit 2b0ba4dc95
6 changed files with 17 additions and 108 deletions
-15
View File
@@ -65,21 +65,6 @@ macro_rules! error {
};
}
#[macro_export]
macro_rules! log_err {
($result: expr) => {
if let Err(err) = $result {
log::error!(target: "app", "{err}");
}
};
($result: expr, $err_str: expr) => {
if let Err(_) = $result {
log::error!(target: "app", "{}", $err_str);
}
};
}
/// wrap the anyhow error
/// transform the error to String
#[macro_export]