mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 15:11:03 +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:
@@ -175,6 +175,7 @@ pub use pallet::*;
|
||||
pub use weights::WeightInfo;
|
||||
|
||||
type AccountIdLookupOf<T> = <<T as frame_system::Config>::Lookup as StaticLookup>::Source;
|
||||
const LOG_TARGET: &str = "runtime::assets";
|
||||
|
||||
/// Trait with callbacks that are executed after successfull asset creation or destruction.
|
||||
pub trait AssetsCallback<AssetId, AccountId> {
|
||||
|
||||
@@ -75,10 +75,18 @@ pub mod v1 {
|
||||
Some(old_value.migrate_to_v1())
|
||||
});
|
||||
current_version.put::<Pallet<T>>();
|
||||
log::info!(target: "runtime::assets", "Upgraded {} pools, storage to version {:?}", translated, current_version);
|
||||
log::info!(
|
||||
target: LOG_TARGET,
|
||||
"Upgraded {} pools, storage to version {:?}",
|
||||
translated,
|
||||
current_version
|
||||
);
|
||||
T::DbWeight::get().reads_writes(translated + 1, translated + 1)
|
||||
} else {
|
||||
log::info!(target: "runtime::assets", "Migration did not execute. This probably should be removed");
|
||||
log::info!(
|
||||
target: LOG_TARGET,
|
||||
"Migration did not execute. This probably should be removed"
|
||||
);
|
||||
T::DbWeight::get().reads(1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user