From 72ffe1b3257a118fec35a8ad14a364962c6512f2 Mon Sep 17 00:00:00 2001 From: Daniel Karzel Date: Tue, 21 Sep 2021 19:38:30 +1000 Subject: [PATCH] Replace all the remaining println with tracing logs --- daemon/src/taker_cfd_actor.rs | 4 ++-- daemon/src/wallet.rs | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/daemon/src/taker_cfd_actor.rs b/daemon/src/taker_cfd_actor.rs index f6cd979..2e39f31 100644 --- a/daemon/src/taker_cfd_actor.rs +++ b/daemon/src/taker_cfd_actor.rs @@ -151,7 +151,7 @@ pub fn new( inbox.send(msg).unwrap(); } Command::CfdSetupCompleted { order_id, dlc } => { - println!("Setup complete, publishing on chain now..."); + tracing::info!("Setup complete, publishing on chain now"); current_contract_setup = None; @@ -174,7 +174,7 @@ pub fn new( let txid = wallet.try_broadcast_transaction(dlc.lock).await.unwrap(); - println!("Lock transaction published with txid {}", txid); + tracing::info!("Lock transaction published with txid {}", txid); // TODO: tx monitoring, once confirmed with x blocks transition the Cfd to // Open diff --git a/daemon/src/wallet.rs b/daemon/src/wallet.rs index 15922d1..704b537 100644 --- a/daemon/src/wallet.rs +++ b/daemon/src/wallet.rs @@ -105,7 +105,10 @@ impl Wallet { let error_code = match parse_rpc_protocol_error_code(value) { Ok(error_code) => error_code, Err(inner) => { - eprintln!("Failed to parse error code from RPC message: {}", inner); + tracing::error!( + "Failed to parse error code from RPC message: {}", + inner + ); return Err(anyhow!(e)); } };