Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tracing -> gum rename fallout
  • Loading branch information
drahnr committed Mar 14, 2022
commit ec437c2dd8489e65e6f4518c9dacfb8155b1aaf7
6 changes: 1 addition & 5 deletions node/core/approval-voting/src/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,7 @@ async fn imported_block_info(
{
Some(s) => s,
None => {
gum::debug!(
target: LOG_TARGET,
"Session info unavailable for block {}",
block_hash,
);
gum::debug!(target: LOG_TARGET, "Session info unavailable for block {}", block_hash,);

return Ok(None)
},
Expand Down
6 changes: 2 additions & 4 deletions node/core/approval-voting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -965,10 +965,8 @@ async fn handle_actions(
gum::debug!(target: LOG_TARGET, "Dispute coordinator confirmation lost",)
},
Ok(ImportStatementsResult::ValidImport) => {},
Ok(ImportStatementsResult::InvalidImport) => gum::warn!(
target: LOG_TARGET,
"Failed to import statements of validity",
),
Ok(ImportStatementsResult::InvalidImport) =>
gum::warn!(target: LOG_TARGET, "Failed to import statements of validity",),
}
},
Action::NoteApprovedInChainSelection(block_hash) => {
Expand Down
2 changes: 1 addition & 1 deletion node/core/chain-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ where
},
ChainApiMessage::Ancestors { hash, k, response_channel } => {
let _timer = subsystem.metrics.time_ancestors();
gum::span!(gum::Level::TRACE, "ChainApiMessage::Ancestors", subsystem=LOG_TARGET, hash=%hash, k=k);
// gum::span!(gum::Level::TRACE, "ChainApiMessage::Ancestors", subsystem=LOG_TARGET, hash=%hash, k=k);

let mut hash = hash;

Expand Down
7 changes: 1 addition & 6 deletions node/core/chain-selection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,12 +455,7 @@ async fn fetch_finalized(

match hash_rx.await? {
Err(err) => {
gum::warn!(
target: LOG_TARGET,
number,
?err,
"Fetching finalized block number failed"
);
gum::warn!(target: LOG_TARGET, number, ?err, "Fetching finalized block number failed");
Ok(None)
},
Ok(None) => {
Expand Down
12 changes: 2 additions & 10 deletions node/core/dispute-coordinator/src/real/initialized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,7 @@ impl Initialized {
self.error = None;
let session = window_end;
if self.highest_session < session {
gum::trace!(
target: LOG_TARGET,
session,
"Observed new session. Pruning"
);
gum::trace!(target: LOG_TARGET, session, "Observed new session. Pruning");

self.highest_session = session;

Expand Down Expand Up @@ -1102,11 +1098,7 @@ impl Initialized {
let dispute_message =
match make_dispute_message(info, &votes, statement.clone(), *index) {
Err(err) => {
gum::debug!(
target: LOG_TARGET,
?err,
"Creating dispute message failed."
);
gum::debug!(target: LOG_TARGET, ?err, "Creating dispute message failed.");
continue
},
Ok(dispute_message) => dispute_message,
Expand Down
6 changes: 1 addition & 5 deletions node/core/dispute-coordinator/src/real/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,7 @@ impl DisputeCoordinatorSubsystem {
get_active_with_status(disputes.into_iter(), clock.now()).collect(),
Ok(None) => Vec::new(),
Err(e) => {
gum::error!(
target: LOG_TARGET,
"Failed initial load of recent disputes: {:?}",
e
);
gum::error!(target: LOG_TARGET, "Failed initial load of recent disputes: {:?}", e);
return Err(e.into())
},
};
Expand Down
7 changes: 1 addition & 6 deletions node/core/pvf-checker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,12 +540,7 @@ async fn initiate_precheck(
validation_code_hash: ValidationCodeHash,
metrics: &Metrics,
) {
gum::debug!(
target: LOG_TARGET,
?validation_code_hash,
?relay_parent,
"initiating a precheck",
);
gum::debug!(target: LOG_TARGET, ?validation_code_hash, ?relay_parent, "initiating a precheck",);

let (tx, rx) = oneshot::channel();
sender
Expand Down
28 changes: 4 additions & 24 deletions node/network/approval-distribution/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -601,13 +601,7 @@ impl State {
};
drop(timer);

gum::trace!(
target: LOG_TARGET,
?source,
?fingerprint,
?result,
"Checked assignment",
);
gum::trace!(target: LOG_TARGET, ?source, ?fingerprint, ?result, "Checked assignment",);
match result {
AssignmentCheckResult::Accepted => {
modify_reputation(ctx, peer_id.clone(), BENEFIT_VALID_MESSAGE_FIRST).await;
Expand Down Expand Up @@ -660,11 +654,7 @@ impl State {
);
return
} else {
gum::debug!(
target: LOG_TARGET,
?fingerprint,
"Importing locally a new assignment",
);
gum::debug!(target: LOG_TARGET, ?fingerprint, "Importing locally a new assignment",);
}
}

Expand Down Expand Up @@ -834,13 +824,7 @@ impl State {
};
drop(timer);

gum::trace!(
target: LOG_TARGET,
?peer_id,
?fingerprint,
?result,
"Checked approval",
);
gum::trace!(target: LOG_TARGET, ?peer_id, ?fingerprint, ?result, "Checked approval",);
match result {
ApprovalCheckResult::Accepted => {
modify_reputation(ctx, peer_id.clone(), BENEFIT_VALID_MESSAGE_FIRST).await;
Expand Down Expand Up @@ -871,11 +855,7 @@ impl State {
);
return
} else {
gum::debug!(
target: LOG_TARGET,
?fingerprint,
"Importing locally a new approval",
);
gum::debug!(target: LOG_TARGET, ?fingerprint, "Importing locally a new approval",);
}
}

Expand Down
3 changes: 1 addition & 2 deletions node/network/availability-distribution/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ pub fn log_error(result: Result<()>, ctx: &'static str) -> std::result::Result<(
JfyiError::InvalidValidatorIndex |
JfyiError::NoSuchCachedSession { .. } |
JfyiError::QueryAvailableDataResponseChannel(_) |
JfyiError::QueryChunkResponseChannel(_) =>
gum::warn!(target: LOG_TARGET, error = %jfyi, ctx),
JfyiError::QueryChunkResponseChannel(_) => gum::warn!(target: LOG_TARGET, error = %jfyi, ctx),
JfyiError::FetchPoV(_) |
JfyiError::SendResponse |
JfyiError::NoSuchPoV |
Expand Down
6 changes: 1 addition & 5 deletions node/network/bitfield-distribution/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,7 @@ async fn handle_bitfield_distribution<Context>(
let validator = if let Some(validator) = validator_set.get(validator_index) {
validator.clone()
} else {
gum::trace!(
target: LOG_TARGET,
"Could not find a validator for index {}",
validator_index
);
gum::trace!(target: LOG_TARGET, "Could not find a validator for index {}", validator_index);
return
};

Expand Down
6 changes: 2 additions & 4 deletions node/network/bridge/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,8 @@ impl Network for Arc<NetworkService<Block, Hash>> {
match pending_response
.send(Err(RequestFailure::Network(OutboundFailure::DialFailure)))
{
Err(_) => gum::debug!(
target: LOG_TARGET,
"Sending failed request response failed."
),
Err(_) =>
gum::debug!(target: LOG_TARGET, "Sending failed request response failed."),
Ok(_) => {},
}
return
Expand Down
6 changes: 1 addition & 5 deletions node/network/dispute-distribution/src/sender/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,7 @@ impl DisputeSender {
let candidate_hash = req.0.candidate_receipt.hash();
match self.disputes.entry(candidate_hash) {
Entry::Occupied(_) => {
gum::trace!(
target: LOG_TARGET,
?candidate_hash,
"Dispute sending already active."
);
gum::trace!(target: LOG_TARGET, ?candidate_hash, "Dispute sending already active.");
return Ok(())
},
Entry::Vacant(vacant) => {
Expand Down
15 changes: 2 additions & 13 deletions node/network/statement-distribution/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1324,13 +1324,7 @@ async fn handle_incoming_message<'a>(

if let protocol_v1::StatementDistributionMessage::LargeStatement(_) = message {
if let Err(rep) = peer_data.receive_large_statement(&relay_parent) {
gum::debug!(
target: LOG_TARGET,
?peer,
?message,
?rep,
"Unexpected large statement.",
);
gum::debug!(target: LOG_TARGET, ?peer, ?message, ?rep, "Unexpected large statement.",);
report_peer(ctx, peer, rep).await;
return None
}
Expand Down Expand Up @@ -1406,12 +1400,7 @@ async fn handle_incoming_message<'a>(
// check the signature on the statement.
match check_statement_signature(&active_head, relay_parent, unchecked_compact) {
Err(statement) => {
gum::debug!(
target: LOG_TARGET,
?peer,
?statement,
"Invalid statement signature"
);
gum::debug!(target: LOG_TARGET, ?peer, ?statement, "Invalid statement signature");
report_peer(ctx, peer, COST_INVALID_SIGNATURE).await;
return None
},
Expand Down
4 changes: 2 additions & 2 deletions node/overseer/overseer-gen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@

pub use polkadot_overseer_gen_proc_macro::overlord;

#[doc(hidden)]
pub use gum;
#[doc(hidden)]
pub use metered;
#[doc(hidden)]
pub use polkadot_node_primitives::SpawnNamed;
#[doc(hidden)]
pub use tracing;

#[doc(hidden)]
pub use async_trait::async_trait;
Expand Down
7 changes: 2 additions & 5 deletions node/overseer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,11 +536,8 @@ where
);
metrics.memory_stats_snapshot(memory_stats_snapshot);
},
Err(e) => gum::debug!(
target: LOG_TARGET,
"Failed to obtain memory stats: {:?}",
e
),
Err(e) =>
gum::debug!(target: LOG_TARGET, "Failed to obtain memory stats: {:?}", e),
}),
Err(_) => {
gum::debug!(
Expand Down
2 changes: 1 addition & 1 deletion node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ mod tests;
use {
beefy_gadget::notification::{BeefyBestBlockSender, BeefySignedCommitmentSender},
grandpa::{self, FinalityProofProvider as GrandpaFinalityProofProvider},
gum::info,
polkadot_node_core_approval_voting::Config as ApprovalVotingConfig,
polkadot_node_core_av_store::Config as AvailabilityConfig,
polkadot_node_core_av_store::Error as AvailabilityError,
Expand All @@ -47,7 +48,6 @@ use {
polkadot_overseer::BlockInfo,
sc_client_api::{BlockBackend, ExecutorProvider},
sp_trie::PrefixedMemoryDB,
gum::info,
};

pub use sp_core::traits::SpawnNamed;
Expand Down
6 changes: 1 addition & 5 deletions node/service/src/relay_chain_selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,11 +487,7 @@ where
}
};

gum::trace!(
target: LOG_TARGET,
?subchain_head,
"Ancestor approval restriction applied",
);
gum::trace!(target: LOG_TARGET, ?subchain_head, "Ancestor approval restriction applied",);

let lag = initial_leaf_number.saturating_sub(subchain_number);
self.metrics.note_approval_checking_finality_lag(lag);
Expand Down