solana-validator monitor now reports identity changes

This commit is contained in:
Michael Vines
2022-02-15 10:46:50 -08:00
parent 03bf66a51b
commit b44f40ee3a
2 changed files with 19 additions and 3 deletions

View File

@@ -108,9 +108,12 @@ pub fn port_range_validator(port_range: String) -> Result<(), String> {
}
}
pub fn format_name_value(name: &str, value: &str) -> String {
format!("{} {}", style(name).bold(), value)
}
/// Pretty print a "name value"
pub fn println_name_value(name: &str, value: &str) {
println!("{} {}", style(name).bold(), value);
format_name_value(name, value);
}
/// Creates a new process bar for processing that will take an unknown amount of time
@@ -141,6 +144,10 @@ impl ProgressBar {
}
}
pub fn println<I: AsRef<str>>(&self, msg: I) {
self.progress_bar.println(msg);
}
pub fn abandon_with_message<T: Into<Cow<'static, str>> + Display>(&self, msg: T) {
if self.is_term {
self.progress_bar.abandon_with_message(msg);