Skip to content

Commit

Permalink
frame::executive: LOG_TARGET const added (paritytech#13650)
Browse files Browse the repository at this point in the history
part of: paritytech#12873

Co-authored-by: parity-processbot <>
  • Loading branch information
michalkucharczyk authored and nathanwhit committed Jul 19, 2023
1 parent 5d98554 commit 32d57f6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions frame/executive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
);
Expand All @@ -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);
Expand Down

0 comments on commit 32d57f6

Please sign in to comment.