Improve logging to make debugging parachains easier (#2279)

* Improve logging to make debugging parachains easier

This pr should make debugging parachains easier, by printing more
information about the validation process.

* 🤦

* moare

* Convert to debug
This commit is contained in:
Bastian Köcher
2021-01-17 12:21:36 +01:00
committed by GitHub
parent 4efa226b69
commit 68103437b6
3 changed files with 82 additions and 29 deletions
@@ -368,6 +368,12 @@ where
if let Some(per_request) = state.requests_info.remove(&id) {
let _ = per_request.received.send(());
if let Some(collator_id) = state.known_collators.get(&origin) {
tracing::debug!(
target: LOG_TARGET,
%request_id,
"Received collation",
);
let _ = per_request.result.send((receipt.clone(), pov.clone()));
state.metrics.on_request(Ok(()));
@@ -420,8 +426,8 @@ where
tracing::trace!(
target: LOG_TARGET,
peer_id = %peer_id,
para_id = %para_id,
relay_parent = %relay_parent,
%para_id,
?relay_parent,
"collation has already been requested",
);
return;
@@ -449,6 +455,15 @@ where
state.requests_in_progress.push(request.wait().boxed());
tracing::debug!(
target: LOG_TARGET,
peer_id = %peer_id,
%para_id,
%request_id,
?relay_parent,
"Requesting collation",
);
let wire_message = protocol_v1::CollatorProtocolMessage::RequestCollation(
request_id,
relay_parent,
@@ -737,7 +752,7 @@ where
// if the chain has not moved on yet.
match request {
CollationRequestResult::Timeout(id) => {
tracing::trace!(target: LOG_TARGET, id, "request timed out");
tracing::debug!(target: LOG_TARGET, request_id=%id, "Collation timed out");
request_timed_out(&mut ctx, &mut state, id).await;
}
CollationRequestResult::Received(id) => {