frame::executive: LOG_TARGET const added (#13650)

part of: #12873

Co-authored-by: parity-processbot <>
This commit is contained in:
Michal Kucharczyk
2023-03-20 21:58:21 +01:00
committed by GitHub
parent 480396fe06
commit d5650ba07b
+6 -3
View File
@@ -137,6 +137,9 @@ use sp_runtime::{
};
use sp_std::{marker::PhantomData, prelude::*};
#[allow(dead_code)]
const LOG_TARGET: &str = "runtime::executive";
pub type CheckedOf<E, C> = <E as Checkable<C>>::Checked;
pub type CallOf<E, C> = <CheckedOf<E, C> as Applyable>::Call;
pub type OriginOf<E, C> = <CallOf<E, C> as Dispatchable>::RuntimeOrigin;
@@ -240,7 +243,7 @@ where
select: frame_try_runtime::TryStateSelect,
) -> Result<Weight, &'static str> {
frame_support::log::info!(
target: "frame::executive",
target: LOG_TARGET,
"try-runtime: executing block #{:?} / state root check: {:?} / signature check: {:?} / try-state-select: {:?}",
block.header().number(),
state_root_check,
@@ -277,7 +280,7 @@ where
for e in extrinsics {
if let Err(err) = try_apply_extrinsic(e.clone()) {
frame_support::log::error!(
target: "runtime::executive", "executing transaction {:?} failed due to {:?}. Aborting the rest of the block execution.",
target: LOG_TARGET, "executing transaction {:?} failed due to {:?}. Aborting the rest of the block execution.",
e,
err,
);
@@ -296,7 +299,7 @@ where
select,
)
.map_err(|e| {
frame_support::log::error!(target: "runtime::executive", "failure: {:?}", e);
frame_support::log::error!(target: LOG_TARGET, "failure: {:?}", e);
e
})?;
drop(_guard);