Adding some more logs (#6455)

* Adding some more logs

More logs are always better! Joke aside, these logs help to debug
certain issues.

* Apply suggestions from code review
This commit is contained in:
Bastian Köcher
2022-12-17 18:51:39 +01:00
committed by GitHub
parent 5c787f1512
commit b5e44b7075
2 changed files with 30 additions and 5 deletions
@@ -326,6 +326,17 @@ impl RunningTask {
&mut self,
validator: &AuthorityDiscoveryId,
) -> std::result::Result<ChunkFetchingResponse, TaskError> {
gum::trace!(
target: LOG_TARGET,
origin = ?validator,
relay_parent = ?self.relay_parent,
group_index = ?self.group_index,
session_index = ?self.session_index,
chunk_index = ?self.request.index,
candidate_hash = ?self.request.candidate_hash,
"Starting chunk request",
);
let (full_request, response_recv) =
OutgoingRequest::new(Recipient::Authority(validator.clone()), self.request);
let requests = Requests::ChunkFetchingV1(full_request);
@@ -346,13 +357,13 @@ impl RunningTask {
Err(RequestError::InvalidResponse(err)) => {
gum::warn!(
target: LOG_TARGET,
origin= ?validator,
origin = ?validator,
relay_parent = ?self.relay_parent,
group_index = ?self.group_index,
session_index = ?self.session_index,
chunk_index = ?self.request.index,
candidate_hash = ?self.request.candidate_hash,
err= ?err,
err = ?err,
"Peer sent us invalid erasure chunk data"
);
Err(TaskError::PeerError)
@@ -360,13 +371,13 @@ impl RunningTask {
Err(RequestError::NetworkError(err)) => {
gum::debug!(
target: LOG_TARGET,
origin= ?validator,
origin = ?validator,
relay_parent = ?self.relay_parent,
group_index = ?self.group_index,
session_index = ?self.session_index,
chunk_index = ?self.request.index,
candidate_hash = ?self.request.candidate_hash,
err= ?err,
err = ?err,
"Some network error occurred when fetching erasure chunk"
);
Err(TaskError::PeerError)
@@ -374,7 +385,7 @@ impl RunningTask {
Err(RequestError::Canceled(oneshot::Canceled)) => {
gum::debug!(
target: LOG_TARGET,
origin= ?validator,
origin = ?validator,
relay_parent = ?self.relay_parent,
group_index = ?self.group_index,
session_index = ?self.session_index,