Skip to content

Commit

Permalink
chore: log the whole error message when the task fails (#2834)
Browse files Browse the repository at this point in the history
"{err}" is not useful, because it truncates the stack trace of anyhow
errors.
  • Loading branch information
pompon0 authored Sep 10, 2024
1 parent 2d71c74 commit 101a685
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/node/node_framework/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ impl ZkStackService {
// Report all the errors we've met during the init.
if !errors.is_empty() {
for (layer, error) in &errors {
tracing::error!("Wiring layer {layer} can't be initialized: {error}");
tracing::error!("Wiring layer {layer} can't be initialized: {error:?}");
}
return Err(ZkStackServiceError::Wiring(errors));
}
Expand Down Expand Up @@ -302,7 +302,7 @@ impl ZkStackService {
tracing::info!("Shutdown hook {name} completed");
}
Ok(Err(err)) => {
tracing::error!("Shutdown hook {name} failed: {err}");
tracing::error!("Shutdown hook {name} failed: {err:?}");
self.errors.push(TaskError::ShutdownHookFailed(name, err));
}
Err(_) => {
Expand All @@ -324,7 +324,7 @@ impl ZkStackService {
tracing::info!("Task {task_name} finished");
}
Ok(Err(err)) => {
tracing::error!("Task {task_name} failed: {err}");
tracing::error!("Task {task_name} failed: {err:?}");
self.errors.push(TaskError::TaskFailed(task_name, err));
}
Err(panic_err) => {
Expand Down

0 comments on commit 101a685

Please sign in to comment.