feat: more trace logs

This commit is contained in:
GyDi
2023-08-04 14:15:15 +08:00
committed by GitHub
parent 2c48ea3508
commit 0cf3bba118
2 changed files with 28 additions and 10 deletions

View File

@@ -119,6 +119,15 @@ macro_rules! log_err {
};
}
#[macro_export]
macro_rules! trace_err {
($result: expr, $err_str: expr) => {
if let Err(err) = $result {
log::trace!(target: "app", "{}, err {}", $err_str, err);
}
}
}
/// wrap the anyhow error
/// transform the error to String
#[macro_export]