Skip to content

Commit

Permalink
Add structured logs
Browse files Browse the repository at this point in the history
  • Loading branch information
haider-rs committed Jul 22, 2024
1 parent 68874b4 commit 7f0d544
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions chronicle/src/tasks/spawner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,15 @@ where
Ok(false) => {
// unregister member
if let Err(e) = self.substrate.submit_unregister_member().await {
tracing::error!("Failed to unregister member: {:?}", e);
tracing::error!(task_id = task_id, "Failed to unregister member: {:?}", e);
};
tracing::warn!("Chronicle balance too low, exiting");
tracing::warn!(task_id = task_id, "Chronicle balance too low, exiting");
std::process::exit(1);
},
Ok(true) => {},
Err(err) => tracing::error!("Could not fetch account balance: {:?}", err),
Err(err) => {
tracing::error!(task_id = task_id, "Could not fetch account balance: {:?}", err)
},
}

let submission = async move {
Expand Down

0 comments on commit 7f0d544

Please sign in to comment.