mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-19 20:25:40 +00:00
introduce log-target constant to more frame pallets (#13116)
* introduce log-target constant to more frame pallets * cargo fmt * make LOG_TARGET in session public * Update frame/elections-phragmen/src/lib.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update frame/elections-phragmen/src/migrations/v3.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update frame/elections-phragmen/src/migrations/v3.rs Co-authored-by: Bastian Köcher <git@kchr.de> * Update frame/elections-phragmen/src/migrations/v3.rs Co-authored-by: Bastian Köcher <git@kchr.de> * move LOG_TARGET=runtime::session_historical to migrations module, where it's actually used Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
@@ -71,6 +71,8 @@ pub mod weights;
|
||||
pub use pallet::*;
|
||||
pub use weights::WeightInfo;
|
||||
|
||||
const LOG_TARGET: &str = "runtime::collective";
|
||||
|
||||
/// Simple index type for proposal counting.
|
||||
pub type ProposalIndex = u32;
|
||||
|
||||
@@ -390,7 +392,7 @@ pub mod pallet {
|
||||
ensure_root(origin)?;
|
||||
if new_members.len() > T::MaxMembers::get() as usize {
|
||||
log::error!(
|
||||
target: "runtime::collective",
|
||||
target: LOG_TARGET,
|
||||
"New members count ({}) exceeds maximum amount of members expected ({}).",
|
||||
new_members.len(),
|
||||
T::MaxMembers::get(),
|
||||
@@ -400,7 +402,7 @@ pub mod pallet {
|
||||
let old = Members::<T, I>::get();
|
||||
if old.len() > old_count as usize {
|
||||
log::warn!(
|
||||
target: "runtime::collective",
|
||||
target: LOG_TARGET,
|
||||
"Wrong count used to estimate set_members weight. expected ({}) vs actual ({})",
|
||||
old_count,
|
||||
old.len(),
|
||||
@@ -1040,7 +1042,7 @@ impl<T: Config<I>, I: 'static> ChangeMembers<T::AccountId> for Pallet<T, I> {
|
||||
) {
|
||||
if new.len() > T::MaxMembers::get() as usize {
|
||||
log::error!(
|
||||
target: "runtime::collective",
|
||||
target: LOG_TARGET,
|
||||
"New members count ({}) exceeds maximum amount of members expected ({}).",
|
||||
new.len(),
|
||||
T::MaxMembers::get(),
|
||||
|
||||
Reference in New Issue
Block a user