mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +00:00
Companion for init the RuntimeLogger automatically (#2522)
* Lol * Add the features * Remove some more runtime logger init calls * Make companion check work * Revert "Make companion check work" This reverts commit a255c798076466c0fa20a4db713fc712772c2b4d. * Update Substrate
This commit is contained in:
@@ -28,8 +28,8 @@ use primitives::v1::{
|
||||
CandidateReceipt, HeadData, CandidateHash, Hash,
|
||||
};
|
||||
use frame_support::{
|
||||
decl_storage, decl_module, decl_error, decl_event, ensure, debug,
|
||||
dispatch::DispatchResult, IterableStorageMap, weights::Weight, traits::Get,
|
||||
decl_storage, decl_module, decl_error, decl_event, ensure, dispatch::DispatchResult, IterableStorageMap,
|
||||
weights::Weight, traits::Get,
|
||||
};
|
||||
use parity_scale_codec::{Encode, Decode};
|
||||
use bitvec::{order::Lsb0 as BitOrderLsb0, vec::BitVec};
|
||||
@@ -213,7 +213,7 @@ decl_module! {
|
||||
}
|
||||
}
|
||||
|
||||
const LOG_TARGET: &str = "parachains_runtime_inclusion";
|
||||
const LOG_TARGET: &str = "runtime::inclusion";
|
||||
|
||||
impl<T: Config> Module<T> {
|
||||
/// Block initialization logic, called by initializer.
|
||||
@@ -343,11 +343,11 @@ impl<T: Config> Module<T> {
|
||||
let commitments = match PendingAvailabilityCommitments::take(¶_id) {
|
||||
Some(commitments) => commitments,
|
||||
None => {
|
||||
debug::warn!(r#"
|
||||
Inclusion::process_bitfields:
|
||||
PendingAvailability and PendingAvailabilityCommitments
|
||||
are out of sync, did someone mess with the storage?
|
||||
"#);
|
||||
log::warn!(
|
||||
target: LOG_TARGET,
|
||||
"Inclusion::process_bitfields: PendingAvailability and PendingAvailabilityCommitments
|
||||
are out of sync, did someone mess with the storage?",
|
||||
);
|
||||
continue;
|
||||
}
|
||||
};
|
||||
@@ -460,7 +460,6 @@ impl<T: Config> Module<T> {
|
||||
&candidate.candidate.commitments.horizontal_messages,
|
||||
)
|
||||
{
|
||||
frame_support::debug::RuntimeLogger::init();
|
||||
log::debug!(
|
||||
target: LOG_TARGET,
|
||||
"Validation outputs checking during inclusion of a candidate {} for parachain `{}` failed: {:?}",
|
||||
@@ -631,7 +630,6 @@ impl<T: Config> Module<T> {
|
||||
T::BlockNumber::from(validation_outputs.hrmp_watermark),
|
||||
&validation_outputs.horizontal_messages,
|
||||
) {
|
||||
frame_support::debug::RuntimeLogger::init();
|
||||
log::debug!(
|
||||
target: LOG_TARGET,
|
||||
"Validation outputs checking for parachain `{}` failed: {:?}",
|
||||
|
||||
@@ -227,8 +227,7 @@ impl<T: Config> ProvideInherent for Module<T> {
|
||||
) {
|
||||
Ok(_) => (signed_bitfields, backed_candidates),
|
||||
Err(err) => {
|
||||
frame_support::debug::RuntimeLogger::init();
|
||||
frame_support::debug::warn!(
|
||||
log::warn!(
|
||||
target: "runtime_inclusion_inherent",
|
||||
"dropping signed_bitfields and backed_candidates because they produced \
|
||||
an invalid inclusion inherent: {:?}",
|
||||
|
||||
@@ -27,7 +27,6 @@ use primitives::v1::{
|
||||
GroupIndex, CandidateEvent, PersistedValidationData, SessionInfo,
|
||||
InboundDownwardMessage, InboundHrmpMessage, Hash, AuthorityDiscoveryId
|
||||
};
|
||||
use frame_support::debug;
|
||||
use crate::{initializer, inclusion, scheduler, configuration, paras, session_info, dmp, hrmp, shared};
|
||||
|
||||
|
||||
@@ -85,8 +84,11 @@ pub fn availability_cores<T: initializer::Config>() -> Vec<CoreState<T::Hash, T:
|
||||
match <scheduler::Module<T>>::group_assigned_to_core(core_index, backed_in_number) {
|
||||
Some(g) => g,
|
||||
None => {
|
||||
debug::warn!("Could not determine the group responsible for core extracted \
|
||||
from list of cores for some prior block in same session");
|
||||
log::warn!(
|
||||
target: "runtime::polkadot-api::v1",
|
||||
"Could not determine the group responsible for core extracted \
|
||||
from list of cores for some prior block in same session",
|
||||
);
|
||||
|
||||
GroupIndex(0)
|
||||
}
|
||||
|
||||
@@ -75,8 +75,8 @@ impl<Config: xcm_executor::Config> UmpSink for XcmSink<Config> {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
frame_support::debug::error!(
|
||||
target: "xcm",
|
||||
log::error!(
|
||||
target: "runtime::ump-sink",
|
||||
"Failed to decode versioned XCM from upward message.",
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user