mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-07 10:14:35 +00:00
chore: use Debug to print errors (#2086)
This commit is contained in:
@@ -1185,9 +1185,9 @@ fn win_service_event_loop(
|
||||
status_handle.set_service_status(normal_status).unwrap();
|
||||
std::process::exit(0);
|
||||
}
|
||||
Err(e) => {
|
||||
Err(error) => {
|
||||
status_handle.set_service_status(error_status).unwrap();
|
||||
log::error!("{}", e);
|
||||
log::error!(?error);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1501,8 +1501,8 @@ pub async fn main() -> ExitCode {
|
||||
|
||||
// Verify configurations
|
||||
if cli.check_config {
|
||||
if let Err(e) = validate_config(&cli).await {
|
||||
log::error!("Config validation failed: {:?}", e);
|
||||
if let Err(error) = validate_config(&cli).await {
|
||||
log::error!(?error, "Config validation failed");
|
||||
return ExitCode::FAILURE;
|
||||
} else {
|
||||
return ExitCode::SUCCESS;
|
||||
@@ -1512,7 +1512,7 @@ pub async fn main() -> ExitCode {
|
||||
let mut ret_code = 0;
|
||||
|
||||
if let Err(error) = run_main(cli).await {
|
||||
log::error!(%error);
|
||||
log::error!(?error);
|
||||
ret_code = 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user