Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

frame::executive: LOG_TARGET const added #13650

Merged
merged 2 commits into from
Mar 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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