Unverified Commit e7bb2996 authored by Bastian Köcher's avatar Bastian Köcher Committed by GitHub
Browse files

Improve the logging (#2645)

parent 7135b58a
Pipeline #129406 passed with stages
in 33 minutes and 35 seconds
...@@ -339,7 +339,7 @@ async fn handle_new_activations<Context: SubsystemContext>( ...@@ -339,7 +339,7 @@ async fn handle_new_activations<Context: SubsystemContext>(
tracing::debug!( tracing::debug!(
target: LOG_TARGET, target: LOG_TARGET,
candidate_hash = %ccr.hash(), candidate_hash = ?ccr.hash(),
?pov_hash, ?pov_hash,
?relay_parent, ?relay_parent,
para_id = %scheduled_core.para_id, para_id = %scheduled_core.para_id,
......
...@@ -723,6 +723,8 @@ impl CandidateBackingJob { ...@@ -723,6 +723,8 @@ impl CandidateBackingJob {
tracing::debug!( tracing::debug!(
target: LOG_TARGET, target: LOG_TARGET,
candidate_hash = ?candidate_hash, candidate_hash = ?candidate_hash,
relay_parent = ?self.parent,
para_id = %backed.candidate.descriptor.para_id,
"Candidate backed", "Candidate backed",
); );
......
...@@ -810,7 +810,6 @@ async fn handle_from_interaction( ...@@ -810,7 +810,6 @@ async fn handle_from_interaction(
let token = state.connecting_validators.push(rx); let token = state.connecting_validators.push(rx);
println!("pushing full data request");
state.discovering_validators.entry(id).or_default().push(Awaited::FullData(AwaitedData { state.discovering_validators.entry(id).or_default().push(Awaited::FullData(AwaitedData {
validator_index, validator_index,
candidate_hash, candidate_hash,
...@@ -848,11 +847,11 @@ async fn handle_network_update( ...@@ -848,11 +847,11 @@ async fn handle_network_update(
tracing::trace!( tracing::trace!(
target: LOG_TARGET, target: LOG_TARGET,
"Responding({}) to chunk request req_id={} candidate={} index={}", data_set = %chunk.is_some(),
chunk.is_some(), %request_id,
request_id, ?candidate_hash,
candidate_hash, validator_index = validator_index.0,
validator_index.0, "Responding to chunk request",
); );
// Whatever the result, issue an // Whatever the result, issue an
...@@ -878,11 +877,11 @@ async fn handle_network_update( ...@@ -878,11 +877,11 @@ async fn handle_network_update(
Some((peer_id, Awaited::Chunk(awaited_chunk))) if peer_id == peer => { Some((peer_id, Awaited::Chunk(awaited_chunk))) if peer_id == peer => {
tracing::trace!( tracing::trace!(
target: LOG_TARGET, target: LOG_TARGET,
"Received chunk response({}) req_id={} candidate={} index={}", data_set = %chunk.is_some(),
chunk.is_some(), %request_id,
request_id, candidate_hash = ?awaited_chunk.candidate_hash,
awaited_chunk.candidate_hash, validator_index = awaited_chunk.validator_index.0,
awaited_chunk.validator_index.0, "Received chunk response",
); );
// If there exists an entry under r_id, remove it. // If there exists an entry under r_id, remove it.
...@@ -917,10 +916,10 @@ async fn handle_network_update( ...@@ -917,10 +916,10 @@ async fn handle_network_update(
tracing::trace!( tracing::trace!(
target: LOG_TARGET, target: LOG_TARGET,
"Responding({}) to full data request req_id={} candidate={}", data_set = full_data.is_some(),
full_data.is_some(), %request_id,
request_id, ?candidate_hash,
candidate_hash, "Responding to full data request",
); );
// Whatever the result, issue an // Whatever the result, issue an
...@@ -946,10 +945,10 @@ async fn handle_network_update( ...@@ -946,10 +945,10 @@ async fn handle_network_update(
Some((peer_id, Awaited::FullData(awaited))) if peer_id == peer => { Some((peer_id, Awaited::FullData(awaited))) if peer_id == peer => {
tracing::trace!( tracing::trace!(
target: LOG_TARGET, target: LOG_TARGET,
"Received full data response({}) req_id={} candidate={}", %request_id,
data.is_some(), candidate_hash = ?awaited.candidate_hash,
request_id, data_set = %data.is_some(),
awaited.candidate_hash, "Received full data response",
); );
// If there exists an entry under r_id, remove it. // If there exists an entry under r_id, remove it.
...@@ -999,11 +998,11 @@ async fn issue_request( ...@@ -999,11 +998,11 @@ async fn issue_request(
Awaited::Chunk(ref awaited_chunk) => { Awaited::Chunk(ref awaited_chunk) => {
tracing::trace!( tracing::trace!(
target: LOG_TARGET, target: LOG_TARGET,
"Requesting chunk req_id={} peer_id={} candidate={} index={}", %request_id,
request_id, %peer_id,
peer_id, candidate_hash = ?awaited_chunk.candidate_hash,
awaited_chunk.candidate_hash, validator_index = %awaited_chunk.validator_index.0,
awaited_chunk.validator_index.0, "Requesting chunk",
); );
protocol_v1::AvailabilityRecoveryMessage::RequestChunk( protocol_v1::AvailabilityRecoveryMessage::RequestChunk(
...@@ -1015,11 +1014,11 @@ async fn issue_request( ...@@ -1015,11 +1014,11 @@ async fn issue_request(
Awaited::FullData(ref awaited_data) => { Awaited::FullData(ref awaited_data) => {
tracing::trace!( tracing::trace!(
target: LOG_TARGET, target: LOG_TARGET,
"Requesting full data req_id={} peer_id={} candidate={} index={}", %request_id,
request_id, %peer_id,
peer_id, candidate_hash = ?awaited_data.candidate_hash,
awaited_data.candidate_hash, validator_index = %awaited_data.validator_index.0,
awaited_data.validator_index.0, "Requesting full data",
); );
protocol_v1::AvailabilityRecoveryMessage::RequestFullData( protocol_v1::AvailabilityRecoveryMessage::RequestFullData(
......
...@@ -688,7 +688,7 @@ where ...@@ -688,7 +688,7 @@ where
Ok(pov) => { Ok(pov) => {
tracing::debug!( tracing::debug!(
target: LOG_TARGET, target: LOG_TARGET,
para_id = ?para_id, para_id = %para_id,
hash = ?hash, hash = ?hash,
candidate_hash = ?receipt.hash(), candidate_hash = ?receipt.hash(),
"Received collation", "Received collation",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment