Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
change code
Browse files Browse the repository at this point in the history
  • Loading branch information
cecton committed Jun 3, 2020
1 parent b5dd8d8 commit e32866a
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions client/informant/src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,12 @@ impl<B: BlockT> InformantDisplay<B> {
),
};

match &self.format {
OutputFormat {
colors: true,
prefix,
} => info!(
if self.format.colors {
info!(
target: "substrate",
"{} {}{}{} ({} peers), best: #{} ({}), finalized #{} ({}), {} {}",
level,
prefix,
self.format.prefix,
Colour::White.bold().paint(&status),
target,
Colour::White.bold().paint(format!("{}", num_connected_peers)),
Expand All @@ -97,15 +94,13 @@ impl<B: BlockT> InformantDisplay<B> {
info.chain.finalized_hash,
Colour::Green.paint(format!("⬇ {}", TransferRateFormat(net_status.average_download_per_sec))),
Colour::Red.paint(format!("⬆ {}", TransferRateFormat(net_status.average_upload_per_sec))),
),
OutputFormat {
colors: false,
prefix,
} => info!(
)
} else {
info!(
target: "substrate",
"{} {}{}{} ({} peers), best: #{} ({}), finalized #{} ({}), ⬇ {} ⬆ {}",
level,
prefix,
self.format.prefix,
status,
target,
num_connected_peers,
Expand All @@ -115,7 +110,7 @@ impl<B: BlockT> InformantDisplay<B> {
info.chain.finalized_hash,
TransferRateFormat(net_status.average_download_per_sec),
TransferRateFormat(net_status.average_upload_per_sec),
),
)
}
}
}
Expand Down

0 comments on commit e32866a

Please sign in to comment.