diff --git a/polkadot/node/collation-generation/src/lib.rs b/polkadot/node/collation-generation/src/lib.rs index 4a93152f97873df1c549c2b0f2594cdf0e38db27..dd2d3d73d4310577164aa397a52f4be6b3e715b9 100644 --- a/polkadot/node/collation-generation/src/lib.rs +++ b/polkadot/node/collation-generation/src/lib.rs @@ -46,7 +46,7 @@ use std::sync::Arc; mod error; -const LOG_TARGET: &'static str = "collation_generation"; +const LOG_TARGET: &'static str = "parachain::collation-generation"; /// Collation Generation Subsystem pub struct CollationGenerationSubsystem { diff --git a/polkadot/node/core/approval-voting/src/lib.rs b/polkadot/node/core/approval-voting/src/lib.rs index 7fcfd475c1b7736242b84e4958877bde69f09c92..d120c738288b1284c71dc46b26a4480d374d32c5 100644 --- a/polkadot/node/core/approval-voting/src/lib.rs +++ b/polkadot/node/core/approval-voting/src/lib.rs @@ -75,7 +75,7 @@ mod persisted_entries; mod tests; const APPROVAL_SESSIONS: SessionIndex = 6; -const LOG_TARGET: &str = "approval_voting"; +const LOG_TARGET: &str = "parachain::approval-voting"; /// Configuration for the approval voting subsystem pub struct Config { diff --git a/polkadot/node/core/av-store/src/lib.rs b/polkadot/node/core/av-store/src/lib.rs index 4a624a1621ae546ab4ce8506941e21c0c36783b8..384d80cea467429280c9681950f75c9d31e322bf 100644 --- a/polkadot/node/core/av-store/src/lib.rs +++ b/polkadot/node/core/av-store/src/lib.rs @@ -49,7 +49,7 @@ use bitvec::{vec::BitVec, order::Lsb0 as BitOrderLsb0}; #[cfg(test)] mod tests; -const LOG_TARGET: &str = "availability"; +const LOG_TARGET: &str = "parachain::availability"; mod columns { pub const DATA: u32 = 0; diff --git a/polkadot/node/core/backing/src/lib.rs b/polkadot/node/core/backing/src/lib.rs index a0ed6e26c96efa7af2b8f1e7b15dd382f2b41c3c..546926d175603919886fe3cb0169fe65ae723b44 100644 --- a/polkadot/node/core/backing/src/lib.rs +++ b/polkadot/node/core/backing/src/lib.rs @@ -66,7 +66,7 @@ use statement_table::{ }; use thiserror::Error; -const LOG_TARGET: &str = "candidate_backing"; +const LOG_TARGET: &str = "parachain::candidate-backing"; #[derive(Debug, Error)] enum Error { diff --git a/polkadot/node/core/bitfield-signing/src/lib.rs b/polkadot/node/core/bitfield-signing/src/lib.rs index 4f8d0275a0434df0af966063b07a2a42ca70607c..9d2e2e7ceed2df36842ea922bd50476bb3f8a043 100644 --- a/polkadot/node/core/bitfield-signing/src/lib.rs +++ b/polkadot/node/core/bitfield-signing/src/lib.rs @@ -39,7 +39,7 @@ use wasm_timer::{Delay, Instant}; /// Delay between starting a bitfield signing job and its attempting to create a bitfield. const JOB_DELAY: Duration = Duration::from_millis(1500); -const LOG_TARGET: &str = "bitfield_signing"; +const LOG_TARGET: &str = "parachain::bitfield-signing"; /// Each `BitfieldSigningJob` prepares a signed bitfield for a single relay parent. pub struct BitfieldSigningJob; diff --git a/polkadot/node/core/candidate-selection/src/lib.rs b/polkadot/node/core/candidate-selection/src/lib.rs index 58ef93fb9ac9652d605f41eb98fc6aebacd54943..47de46e9d7fab5af1869fbdf14111911f6d3bc85 100644 --- a/polkadot/node/core/candidate-selection/src/lib.rs +++ b/polkadot/node/core/candidate-selection/src/lib.rs @@ -43,7 +43,7 @@ use polkadot_node_primitives::SignedFullStatement; use std::{pin::Pin, sync::Arc}; use thiserror::Error; -const LOG_TARGET: &'static str = "candidate_selection"; +const LOG_TARGET: &'static str = "parachain::candidate-selection"; struct CandidateSelectionJob { assignment: ParaId, diff --git a/polkadot/node/core/candidate-validation/src/lib.rs b/polkadot/node/core/candidate-validation/src/lib.rs index f6ca38437bfa01a5ab576dc2d47057a805520175..a57a2cb8ecfeacc68501b31899c209e4d04da613 100644 --- a/polkadot/node/core/candidate-validation/src/lib.rs +++ b/polkadot/node/core/candidate-validation/src/lib.rs @@ -51,7 +51,7 @@ use futures::prelude::*; use std::sync::Arc; -const LOG_TARGET: &'static str = "candidate_validation"; +const LOG_TARGET: &'static str = "parachain::candidate-validation"; /// The candidate validation subsystem. pub struct CandidateValidationSubsystem<S> { diff --git a/polkadot/node/core/chain-api/src/lib.rs b/polkadot/node/core/chain-api/src/lib.rs index 534c41e3ef85b1dc4aed3a342f851eef1de5631f..782fcb19ed06663fd250927e60c0beeeb2c551b0 100644 --- a/polkadot/node/core/chain-api/src/lib.rs +++ b/polkadot/node/core/chain-api/src/lib.rs @@ -44,7 +44,7 @@ use std::sync::Arc; use futures::prelude::*; -const LOG_TARGET: &str = "chain_api"; +const LOG_TARGET: &str = "parachain::chain-api"; /// The Chain API Subsystem implementation. pub struct ChainApiSubsystem<Client> { diff --git a/polkadot/node/core/provisioner/src/lib.rs b/polkadot/node/core/provisioner/src/lib.rs index f773ec27a8dca73aab0fd903a24ef77f516e3e1b..4a2aa096f3e2c2e52f7e57af2136980c1968c09b 100644 --- a/polkadot/node/core/provisioner/src/lib.rs +++ b/polkadot/node/core/provisioner/src/lib.rs @@ -46,7 +46,7 @@ use futures_timer::Delay; /// How long to wait before proposing. const PRE_PROPOSE_TIMEOUT: std::time::Duration = core::time::Duration::from_millis(2000); -const LOG_TARGET: &str = "provisioner"; +const LOG_TARGET: &str = "parachain::provisioner"; enum InherentAfter { Ready, diff --git a/polkadot/node/core/runtime-api/src/lib.rs b/polkadot/node/core/runtime-api/src/lib.rs index 5251cfd27dddd5fc4aeb9399fcd4570cc085f3ef..d7dfa8b162f4409864631dedad2861c9fd9c988b 100644 --- a/polkadot/node/core/runtime-api/src/lib.rs +++ b/polkadot/node/core/runtime-api/src/lib.rs @@ -43,7 +43,7 @@ use cache::{RequestResult, RequestResultCache}; mod cache; -const LOG_TARGET: &str = "runtime_api"; +const LOG_TARGET: &str = "parachain::runtime-api"; /// The number of maximum runtime api requests can be executed in parallel. Further requests will be buffered. const MAX_PARALLEL_REQUESTS: usize = 4; diff --git a/polkadot/node/network/approval-distribution/src/lib.rs b/polkadot/node/network/approval-distribution/src/lib.rs index 4d98d58ba79ccb828be1eecddee51e0c481c113a..6459682e2c4c0442541fc55c1f00522f3bab4c1c 100644 --- a/polkadot/node/network/approval-distribution/src/lib.rs +++ b/polkadot/node/network/approval-distribution/src/lib.rs @@ -45,7 +45,7 @@ use polkadot_node_network_protocol::{ }; -const LOG_TARGET: &str = "approval_distribution"; +const LOG_TARGET: &str = "parachain::approval-distribution"; const COST_UNEXPECTED_MESSAGE: Rep = Rep::CostMinor("Peer sent an out-of-view assignment or approval"); const COST_DUPLICATE_MESSAGE: Rep = Rep::CostMinorRepeated("Peer sent identical messages"); diff --git a/polkadot/node/network/availability-distribution/src/lib.rs b/polkadot/node/network/availability-distribution/src/lib.rs index a447204880e19fd2b41ad2a1f6eee995c12bcdff..03cc06ffc72100fdd490662e7a0d6e7ff00f45e1 100644 --- a/polkadot/node/network/availability-distribution/src/lib.rs +++ b/polkadot/node/network/availability-distribution/src/lib.rs @@ -46,7 +46,7 @@ pub use metrics::Metrics; #[cfg(test)] mod tests; -const LOG_TARGET: &'static str = "availability_distribution"; +const LOG_TARGET: &'static str = "parachain::availability-distribution"; /// The availability distribution subsystem. pub struct AvailabilityDistributionSubsystem { diff --git a/polkadot/node/network/availability-recovery/src/lib.rs b/polkadot/node/network/availability-recovery/src/lib.rs index a18fe1eda96d9a80fc6656ce87ce93e7ff848e45..f968c636c92c0b34b02cd1f6c877d12aa6c3388a 100644 --- a/polkadot/node/network/availability-recovery/src/lib.rs +++ b/polkadot/node/network/availability-recovery/src/lib.rs @@ -56,7 +56,7 @@ mod error; #[cfg(test)] mod tests; -const LOG_TARGET: &str = "availability_recovery"; +const LOG_TARGET: &str = "parachain::availability-recovery"; const COST_MERKLE_PROOF_INVALID: Rep = Rep::CostMinor("Merkle proof was invalid"); const COST_UNEXPECTED_CHUNK: Rep = Rep::CostMinor("Peer has sent an unexpected chunk"); diff --git a/polkadot/node/network/bitfield-distribution/src/lib.rs b/polkadot/node/network/bitfield-distribution/src/lib.rs index a77e127606a37d07a71e4b87dbc9da45754ad813..84ebc809ed1e0f784a6da14e40cb5cea8a9dae7d 100644 --- a/polkadot/node/network/bitfield-distribution/src/lib.rs +++ b/polkadot/node/network/bitfield-distribution/src/lib.rs @@ -136,7 +136,7 @@ impl PerRelayParentData { } } -const LOG_TARGET: &str = "bitfield_distribution"; +const LOG_TARGET: &str = "parachain::bitfield-distribution"; /// The bitfield distribution subsystem. pub struct BitfieldDistribution { diff --git a/polkadot/node/network/bridge/src/lib.rs b/polkadot/node/network/bridge/src/lib.rs index a49363846cee75724f0528b23ac5358ffcadf2c7..d8913dbb25cec9ce9219979086a3daef183620d4 100644 --- a/polkadot/node/network/bridge/src/lib.rs +++ b/polkadot/node/network/bridge/src/lib.rs @@ -77,7 +77,7 @@ const MALFORMED_VIEW_COST: Rep = Rep::CostMajor("Malformed view"); const EMPTY_VIEW_COST: Rep = Rep::CostMajor("Peer sent us an empty view"); // network bridge log target -const LOG_TARGET: &'static str = "network_bridge"; +const LOG_TARGET: &'static str = "parachain::network-bridge"; /// Messages from and to the network. /// diff --git a/polkadot/node/network/bridge/src/validator_discovery.rs b/polkadot/node/network/bridge/src/validator_discovery.rs index 87ff378fd6220aeb04d81f00f44743e8bdaa3f15..081d3f6c445e5ecea0c5440339acec3906ebe7b0 100644 --- a/polkadot/node/network/bridge/src/validator_discovery.rs +++ b/polkadot/node/network/bridge/src/validator_discovery.rs @@ -30,7 +30,7 @@ use polkadot_node_network_protocol::PeerId; use polkadot_primitives::v1::{AuthorityDiscoveryId, Block, Hash}; use polkadot_node_network_protocol::peer_set::{PeerSet, PerPeerSet}; -const LOG_TARGET: &str = "validator_discovery"; +const LOG_TARGET: &str = "parachain::validator-discovery"; /// An abstraction over networking for the purposes of validator discovery service. #[async_trait] diff --git a/polkadot/node/network/collator-protocol/src/lib.rs b/polkadot/node/network/collator-protocol/src/lib.rs index a1201c597e9cd9fda4bd35af176d45355164fbc7..fdaf33b519b09f43104d6e132a01e7720a94c119 100644 --- a/polkadot/node/network/collator-protocol/src/lib.rs +++ b/polkadot/node/network/collator-protocol/src/lib.rs @@ -43,7 +43,7 @@ use polkadot_node_subsystem_util::{ mod collator_side; mod validator_side; -const LOG_TARGET: &'static str = "collator_protocol"; +const LOG_TARGET: &'static str = "parachain::collator-protocol"; const REQUEST_TIMEOUT: Duration = Duration::from_secs(1); #[derive(Debug, Error)] diff --git a/polkadot/node/network/gossip-support/src/lib.rs b/polkadot/node/network/gossip-support/src/lib.rs index 8ade01a0ced8b4de4eb4c6af3887dbe5de1bf506..e984e1a641c4e5e708c44d8a0966b8d4a2610ca2 100644 --- a/polkadot/node/network/gossip-support/src/lib.rs +++ b/polkadot/node/network/gossip-support/src/lib.rs @@ -36,7 +36,7 @@ use polkadot_primitives::v1::{ }; use polkadot_node_network_protocol::peer_set::PeerSet; -const LOG_TARGET: &str = "gossip_support"; +const LOG_TARGET: &str = "parachain::gossip-support"; /// The Gossip Support subsystem. pub struct GossipSupport {} diff --git a/polkadot/node/network/pov-distribution/src/lib.rs b/polkadot/node/network/pov-distribution/src/lib.rs index fc18fb8fb820785ad366ddbce1952aaa52bf98ed..e7a86bd50752a7da3177af0fbc84e600f3271275 100644 --- a/polkadot/node/network/pov-distribution/src/lib.rs +++ b/polkadot/node/network/pov-distribution/src/lib.rs @@ -64,7 +64,7 @@ const BENEFIT_FRESH_POV: Rep = Rep::BenefitMinorFirst("Peer supplied us with an const BENEFIT_LATE_POV: Rep = Rep::BenefitMinor("Peer supplied us with an awaited PoV, \ but was not the first to do so"); -const LOG_TARGET: &str = "pov_distribution"; +const LOG_TARGET: &str = "parachain::pov-distribution"; /// The PoV Distribution Subsystem. pub struct PoVDistribution { diff --git a/polkadot/node/network/statement-distribution/src/lib.rs b/polkadot/node/network/statement-distribution/src/lib.rs index bca8160a64c0eb01c80eb5b43405e1b9151af986..ee5cbeb592878f230773e44344c2c04ebeaa3f10 100644 --- a/polkadot/node/network/statement-distribution/src/lib.rs +++ b/polkadot/node/network/statement-distribution/src/lib.rs @@ -63,7 +63,7 @@ const BENEFIT_VALID_STATEMENT_FIRST: Rep = Rep::BenefitMajorFirst( /// Typically we will only keep 1, but when a validator equivocates we will need to track 2. const VC_THRESHOLD: usize = 2; -const LOG_TARGET: &str = "statement_distribution"; +const LOG_TARGET: &str = "parachain::statement-distribution"; /// The statement distribution subsystem. pub struct StatementDistribution { diff --git a/polkadot/node/overseer/src/lib.rs b/polkadot/node/overseer/src/lib.rs index ae88e53805dac2407b59e106bb272afeb8ef082c..906e8ff9090e24bb6012168dc0f3d234799283cb 100644 --- a/polkadot/node/overseer/src/lib.rs +++ b/polkadot/node/overseer/src/lib.rs @@ -100,7 +100,7 @@ const CHANNEL_CAPACITY: usize = 1024; // A graceful `Overseer` teardown time delay. const STOP_DELAY: u64 = 1; // Target for logs. -const LOG_TARGET: &'static str = "overseer"; +const LOG_TARGET: &'static str = "parachain::overseer"; // Rate at which messages are timed. const MESSAGE_TIMER_METRIC_CAPTURE_RATE: f64 = 0.005; diff --git a/polkadot/node/service/src/grandpa_support.rs b/polkadot/node/service/src/grandpa_support.rs index 991df8b6708fbbb423eed8472a1cb7f2b656d239..6ffb9e2ca49156d910d7bea156f12c50d0143691 100644 --- a/polkadot/node/service/src/grandpa_support.rs +++ b/polkadot/node/service/src/grandpa_support.rs @@ -158,7 +158,7 @@ impl<B> grandpa::VotingRule<PolkadotBlock, B> for ApprovalCheckingDiagnostic } tracing::debug!( - target: "approval_voting", + target: "parachain::approval-voting", "GRANDPA: voting on {:?}. Approval-checking lag behind best is {}", actual_vote_target, approval_checking_subsystem_lag, diff --git a/polkadot/node/subsystem-util/src/validator_discovery.rs b/polkadot/node/subsystem-util/src/validator_discovery.rs index 9219746335c0eda2339b04d0d00028d0db0878dd..292daa62f0b793bf6fd688ca63bdd1d496099118 100644 --- a/polkadot/node/subsystem-util/src/validator_discovery.rs +++ b/polkadot/node/subsystem-util/src/validator_discovery.rs @@ -78,7 +78,7 @@ pub async fn connect_to_validators_in_session<Context: SubsystemContext>( }; tracing::trace!( - target: "network_bridge", + target: "parachain::validator-discovery", validators = ?validators, discovery_keys = ?discovery_keys, session_index, diff --git a/polkadot/parachain/src/wasm_executor/validation_host.rs b/polkadot/parachain/src/wasm_executor/validation_host.rs index 9f466b82c5818074121f9f31bbc73ea1a01409e8..ccfba3b585b82adfa7294f4472ae60b04202b049 100644 --- a/polkadot/parachain/src/wasm_executor/validation_host.rs +++ b/polkadot/parachain/src/wasm_executor/validation_host.rs @@ -28,7 +28,7 @@ const WORKER_ARG: &'static str = "validation-worker"; /// CLI Argument to start in validation worker mode. pub const WORKER_ARGS: &[&'static str] = &[WORKER_ARG]; -const LOG_TARGET: &'static str = "validation-worker"; +const LOG_TARGET: &'static str = "parachain::validation-worker"; mod workspace; diff --git a/polkadot/runtime/parachains/src/inclusion_inherent.rs b/polkadot/runtime/parachains/src/inclusion_inherent.rs index 2770ca33854feb1d1a0722524ffcfbf048c17b87..9d2238d2c0d12a83ee9a1fdbe51c27c37a4fff28 100644 --- a/polkadot/runtime/parachains/src/inclusion_inherent.rs +++ b/polkadot/runtime/parachains/src/inclusion_inherent.rs @@ -39,6 +39,7 @@ use crate::{ }; use inherents::{InherentIdentifier, InherentData, MakeFatalError, ProvideInherent}; +const LOG_TARGET: &str = "runtime::inclusion-inherent"; // In the future, we should benchmark these consts; these are all untested assumptions for now. const BACKED_CANDIDATE_WEIGHT: Weight = 100_000; const INCLUSION_INHERENT_CLAIMED_WEIGHT: Weight = 1_000_000_000; @@ -228,7 +229,7 @@ impl<T: Config> ProvideInherent for Module<T> { Ok(_) => (signed_bitfields, backed_candidates), Err(err) => { log::warn!( - target: "runtime_inclusion_inherent", + target: LOG_TARGET, "dropping signed_bitfields and backed_candidates because they produced \ an invalid inclusion inherent: {:?}", err, diff --git a/polkadot/runtime/parachains/src/ump.rs b/polkadot/runtime/parachains/src/ump.rs index 6245e14b3c25a3567910a7510aeb9fab465bb11e..4a8c194a62b3fc3afe0f00c11dc4328f4c0013ce 100644 --- a/polkadot/runtime/parachains/src/ump.rs +++ b/polkadot/runtime/parachains/src/ump.rs @@ -23,6 +23,8 @@ use sp_std::collections::{btree_map::BTreeMap, vec_deque::VecDeque}; use frame_support::{decl_module, decl_storage, StorageMap, StorageValue, weights::Weight, traits::Get}; use primitives::v1::{Id as ParaId, UpwardMessage}; +const LOG_TARGET: &str = "runtime::ump-sink"; + /// All upward messages coming from parachains will be funneled into an implementation of this trait. /// /// The message is opaque from the perspective of UMP. The message size can range from 0 to @@ -76,7 +78,7 @@ impl<Config: xcm_executor::Config> UmpSink for XcmSink<Config> { } } else { log::error!( - target: "runtime::ump-sink", + target: LOG_TARGET, "Failed to decode versioned XCM from upward message.", ); }