mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 23:07:57 +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:
@@ -24,7 +24,7 @@ pub fn migrate_to_v1<T: Config<I>, I: 'static, P: GetStorageVersion + PalletInfo
|
||||
) -> frame_support::weights::Weight {
|
||||
let on_chain_storage_version = <P as GetStorageVersion>::on_chain_storage_version();
|
||||
log::info!(
|
||||
target: "runtime::uniques",
|
||||
target: LOG_TARGET,
|
||||
"Running migration storage v1 for uniques with storage version {:?}",
|
||||
on_chain_storage_version,
|
||||
);
|
||||
@@ -37,7 +37,7 @@ pub fn migrate_to_v1<T: Config<I>, I: 'static, P: GetStorageVersion + PalletInfo
|
||||
}
|
||||
StorageVersion::new(1).put::<P>();
|
||||
log::info!(
|
||||
target: "runtime::uniques",
|
||||
target: LOG_TARGET,
|
||||
"Running migration storage v1 for uniques with storage version {:?} was complete",
|
||||
on_chain_storage_version,
|
||||
);
|
||||
@@ -45,7 +45,7 @@ pub fn migrate_to_v1<T: Config<I>, I: 'static, P: GetStorageVersion + PalletInfo
|
||||
T::DbWeight::get().reads_writes(count as u64 + 1, count as u64 + 1)
|
||||
} else {
|
||||
log::warn!(
|
||||
target: "runtime::uniques",
|
||||
target: LOG_TARGET,
|
||||
"Attempted to apply migration to v1 but failed because storage version is {:?}",
|
||||
on_chain_storage_version,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user