Skip to content

Commit

Permalink
refactor(iroha_test_network): use pretty format for logs
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Murzin <diralik@yandex.ru>
  • Loading branch information
dima74 committed Feb 25, 2025
1 parent d9683fc commit e480669
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/iroha_test_network/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ impl NetworkPeer {
format!("127.0.0.1:{}", self.port_p2p),
)
.write(["torii", "address"], format!("127.0.0.1:{}", self.port_api))
.write(["logger", "format"], "json");
.write(["logger", "format"], "pretty");

let config_path = self.dir.path().join(format!("run-{run_num}-config.toml"));
let genesis_path = self.dir.path().join(format!("run-{run_num}-genesis.scale"));
Expand Down Expand Up @@ -597,7 +597,8 @@ impl NetworkPeer {
.unwrap();
tasks.spawn(async move {
let mut lines = BufReader::new(output).lines();
while let Ok(Some(line)) = lines.next_line().await {
while let Ok(Some(mut line)) = lines.next_line().await {
line.push('\n');
file.write_all(line.as_bytes())
.await
.expect("writing logs to file shouldn't fail");
Expand Down

0 comments on commit e480669

Please sign in to comment.