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

Commit

Permalink
paras: add log target (#4478)
Browse files Browse the repository at this point in the history
Simply extract hardcoded log target into a const.
  • Loading branch information
pepyakin authored Dec 16, 2021
1 parent 4a8ac3a commit 2004217
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions runtime/parachains/src/paras.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ impl<T: Config> Pallet<T> {
Self::decrease_code_ref(&removed_code_hash);
} else {
log::warn!(
target: "runtime::paras",
target: LOG_TARGET,
"Missing code for removed hash {:?}",
removed_code_hash,
);
Expand Down Expand Up @@ -1115,7 +1115,7 @@ impl<T: Config> Pallet<T> {
// `PvfActiveVoteMap`'s keys is always equal to the set of items found in
// `PvfActiveVoteList`.
log::warn!(
target: "runtime::paras",
target: LOG_TARGET,
"The PvfActiveVoteMap is out of sync with PvfActiveVoteList!",
);
debug_assert!(false);
Expand Down Expand Up @@ -1453,7 +1453,7 @@ impl<T: Config> Pallet<T> {
// NOTE: we cannot set `UpgradeGoAheadSignal` signal here since this will be reset by
// the following call `note_new_head`
log::warn!(
target: "runtime::paras",
target: LOG_TARGET,
"ended up scheduling an upgrade while one is pending",
);
return weight
Expand All @@ -1470,7 +1470,7 @@ impl<T: Config> Pallet<T> {
// NOTE: we cannot set `UpgradeGoAheadSignal` signal here since this will be reset by
// the following call `note_new_head`
log::warn!(
target: "runtime::paras",
target: LOG_TARGET,
"para tried to upgrade to the same code. Abort the upgrade",
);
return weight
Expand Down Expand Up @@ -1654,11 +1654,7 @@ impl<T: Config> Pallet<T> {
if let Err(e) = SubmitTransaction::<T, Call<T>>::submit_unsigned_transaction(
Call::include_pvf_check_statement { stmt, signature }.into(),
) {
log::error!(
target: "runtime::paras",
"Error submitting pvf check statement: {:?}",
e,
);
log::error!(target: LOG_TARGET, "Error submitting pvf check statement: {:?}", e,);
}
}

Expand Down

0 comments on commit 2004217

Please sign in to comment.