From 804e0918f15f93892965778656147a2923c92726 Mon Sep 17 00:00:00 2001 From: Sergei Shulepov Date: Thu, 16 Dec 2021 18:00:34 +0100 Subject: [PATCH] paras: add log target (#4478) Simply extract hardcoded log target into a const. --- polkadot/runtime/parachains/src/paras.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/polkadot/runtime/parachains/src/paras.rs b/polkadot/runtime/parachains/src/paras.rs index cf1dd2076b..c66e6a80f3 100644 --- a/polkadot/runtime/parachains/src/paras.rs +++ b/polkadot/runtime/parachains/src/paras.rs @@ -1038,7 +1038,7 @@ impl Pallet { Self::decrease_code_ref(&removed_code_hash); } else { log::warn!( - target: "runtime::paras", + target: LOG_TARGET, "Missing code for removed hash {:?}", removed_code_hash, ); @@ -1115,7 +1115,7 @@ impl Pallet { // `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); @@ -1453,7 +1453,7 @@ impl Pallet { // 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 @@ -1470,7 +1470,7 @@ impl Pallet { // 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 @@ -1654,11 +1654,7 @@ impl Pallet { if let Err(e) = SubmitTransaction::>::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,); } }