chore: use Debug to print errors (#2086)

This commit is contained in:
Luna Yao
2026-04-09 03:45:55 +02:00
committed by GitHub
parent c5fbd29c0e
commit a8feb9ac2b
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -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;
}