From 0ce414f56028969c7705849064077e9a2a4e82e5 Mon Sep 17 00:00:00 2001 From: Adam Reif Date: Tue, 30 May 2023 15:39:36 -0400 Subject: [PATCH] looging target Signed-off-by: Adam Reif --- pallets/parachain-staking/src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pallets/parachain-staking/src/lib.rs b/pallets/parachain-staking/src/lib.rs index e3d33c580..8c247ce83 100644 --- a/pallets/parachain-staking/src/lib.rs +++ b/pallets/parachain-staking/src/lib.rs @@ -77,6 +77,9 @@ pub use traits::*; pub use types::*; pub use RoundIndex; +#[cfg(not(feature = "on-chain-release-build"))] +const LOG_TARGET: &str = "parachain-staking"; + #[pallet] pub mod pallet { use crate::{ @@ -1711,7 +1714,10 @@ pub mod pallet { // choose the top TotalSelected qualified candidates, ordered by stake let collators = Self::compute_top_candidates(); if collators.is_empty() { - log::error!("FAILED TO SELECT >=1 COLLATOR => using collators from previous round"); + log::error!( + target: crate::LOG_TARGET, + "FAILED TO SELECT >=1 COLLATOR => using collators from previous round" + ); let last_round = now.saturating_sub(1u32); let mut total_per_candidate: BTreeMap> = BTreeMap::new(); // set this round AtStake to last round AtStake