Skip to content

Commit

Permalink
Better logging
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed Jun 17, 2024
1 parent d2f1ee7 commit 1a06fd1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/subspace-farmer/src/cluster/nats_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ impl NatsClient {
);
if received_index != expected_index {
warn!(
%response_subject,
%received_index,
%expected_index,
request_type = %type_name::<Request>(),
Expand All @@ -685,6 +686,7 @@ impl NatsClient {
}
} else {
warn!(
%response_subject,
request_type = %type_name::<Request>(),
response_type = %type_name::<Request::Response>(),
message = %hex::encode(message.payload),
Expand All @@ -695,6 +697,7 @@ impl NatsClient {
}
Ok(None) => {
warn!(
%response_subject,
request_type = %type_name::<Request>(),
response_type = %type_name::<Request::Response>(),
"Acknowledgement stream ended unexpectedly"
Expand All @@ -703,6 +706,8 @@ impl NatsClient {
}
Err(_error) => {
warn!(
%response_subject,
%expected_index,
request_type = %type_name::<Request>(),
response_type = %type_name::<Request::Response>(),
"Acknowledgement wait timed out"
Expand Down

0 comments on commit 1a06fd1

Please sign in to comment.