@@ -19,6 +19,7 @@ use std::{fmt::Debug, str::FromStr};
1919
2020use bytesize:: ByteSize ;
2121use frame_try_runtime:: UpgradeCheckSelect ;
22+ use paris:: formatter:: colorize_string;
2223use parity_scale_codec:: Encode ;
2324use sc_executor:: sp_wasm_interface:: HostFunctions ;
2425use sp_core:: { hexdisplay:: HexDisplay , Hasher } ;
@@ -101,8 +102,23 @@ where
101102
102103 // Run `TryRuntime_on_runtime_upgrade` with the given checks.
103104 log:: info!(
104- "🔬 Running TryRuntime_on_runtime_upgrade with checks: {:?}" ,
105- command. checks
105+ "{}" ,
106+ colorize_string(
107+ "<bold><blue>-------------------------------------------------------------------\n \n "
108+ )
109+ ) ;
110+ log:: info!(
111+ "{}" ,
112+ colorize_string( format!(
113+ "🔬 <bold><blue>Running TryRuntime_on_runtime_upgrade with checks: {:?}\n \n " ,
114+ command. checks
115+ ) )
116+ ) ;
117+ log:: info!(
118+ "{}" ,
119+ colorize_string(
120+ "<bold><blue>-------------------------------------------------------------------"
121+ )
106122 ) ;
107123 // Save the overlayed changes from the first run, so we can use them later for idempotency
108124 // checks.
@@ -126,7 +142,16 @@ where
126142 UpgradeCheckSelect :: None => ( proof, ref_time_results) ,
127143 _ => {
128144 log:: info!(
129- "🔬 TryRuntime_on_runtime_upgrade succeeded! Running it again without checks for weight measurements."
145+ "{}" ,
146+ colorize_string( "<bold><blue>-------------------------------------------------------------------\n \n " )
147+ ) ;
148+ log:: info!(
149+ "{}" ,
150+ colorize_string( "🔬 <bold><blue>TryRuntime_on_runtime_upgrade succeeded! Running it again without checks for weight measurements.\n \n " ) ,
151+ ) ;
152+ log:: info!(
153+ "{}" ,
154+ colorize_string( "<bold><blue>-------------------------------------------------------------------" )
130155 ) ;
131156 let ( proof, encoded_result) = state_machine_call_with_proof :: < Block , HostFns > (
132157 & ext,
@@ -150,8 +175,16 @@ where
150175 }
151176 false => {
152177 log:: info!(
153- "🔬 Running TryRuntime_on_runtime_upgrade again to check idempotency: {:?}" ,
154- command. checks
178+ "{}" ,
179+ colorize_string( "<bold><blue>-------------------------------------------------------------------\n \n " )
180+ ) ;
181+ log:: info!(
182+ "{}" ,
183+ colorize_string( format!( "🔬 <bold><blue>Running TryRuntime_on_runtime_upgrade again to check idempotency: {:?}\n \n " , command. checks) ) ,
184+ ) ;
185+ log:: info!(
186+ "{}" ,
187+ colorize_string( "<bold><blue>-------------------------------------------------------------------" )
155188 ) ;
156189 let ( oc_pre_root, _) = overlayed_changes. storage_root ( & ext. backend , ext. state_version ) ;
157190 match state_machine_call_with_proof :: < Block , HostFns > (
@@ -213,7 +246,20 @@ where
213246 } ;
214247
215248 if !weight_ok || !idempotency_ok {
216- log:: error!( "❌ Issues detected, exiting non-zero. See logs." ) ;
249+ log:: error!(
250+ "{}" ,
251+ colorize_string( "<bold><red>-------------------------------------------------------------------\n \n " )
252+ ) ;
253+ log:: error!(
254+ "{}" ,
255+ colorize_string( "❌ <bold><red>Issues detected, exiting non-zero. See logs.\n \n " ) ,
256+ ) ;
257+ log:: error!(
258+ "{}" ,
259+ colorize_string(
260+ "<bold><red>-------------------------------------------------------------------"
261+ )
262+ ) ;
217263 std:: process:: exit ( 1 ) ;
218264 }
219265
0 commit comments