Skip to content

Commit 92fc1f0

Browse files
author
Samuel Dare
committed
chore: make logs human readable
1 parent 8766c98 commit 92fc1f0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pallets/subtensor/src/migration.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use super::*;
2+
use alloc::string::String;
23
use frame_support::traits::DefensiveResult;
34
use frame_support::{
45
pallet_prelude::{Identity, OptionQuery},
@@ -79,7 +80,10 @@ pub fn migrate_fix_total_coldkey_stake<T: Config>() -> Weight {
7980
return Weight::zero();
8081
}
8182

82-
log::info!("Running migration '{:?}'", migration_name);
83+
log::info!(
84+
"Running migration '{}'",
85+
String::from_utf8_lossy(&migration_name)
86+
);
8387

8488
// Run the migration
8589
weight = weight.saturating_add(do_migrate_fix_total_coldkey_stake::<T>());
@@ -94,7 +98,7 @@ pub fn migrate_fix_total_coldkey_stake<T: Config>() -> Weight {
9498

9599
log::info!(
96100
"Migration '{:?}' completed. Storage version set to 7.",
97-
migration_name
101+
String::from_utf8_lossy(&migration_name)
98102
);
99103

100104
// Return the migration weight.

0 commit comments

Comments
 (0)