Utilize tracing's fields more

pull/607/head
Thomas Eizinger 3 years ago committed by Daniel Karzel
parent 9119ce5cc4
commit 8f50eb2f34
No known key found for this signature in database
GPG Key ID: 30C3FC2E438ADB6E

@ -42,7 +42,7 @@ impl Transport for TorDialOnlyTransport {
} }
let dial_future = async move { let dial_future = async move {
tracing::trace!("Connecting through Tor proxy to address {}", addr); tracing::trace!(address = %addr, "Establishing connection through Tor proxy");
let stream = let stream =
Socks5Stream::connect((Ipv4Addr::LOCALHOST, self.socks_port), address.to_string()) Socks5Stream::connect((Ipv4Addr::LOCALHOST, self.socks_port), address.to_string())

@ -246,8 +246,8 @@ where
Err(error) => { Err(error) => {
tracing::error!("Failed to construct redeem transaction: {:#}", error); tracing::error!("Failed to construct redeem transaction: {:#}", error);
tracing::info!( tracing::info!(
"Waiting for cancellation timelock ({}) to expire", timelock = %state3.cancel_timelock,
state3.cancel_timelock "Waiting for cancellation timelock to expire",
); );
tx_lock_status tx_lock_status

@ -150,8 +150,8 @@ async fn next_state(
match received_xmr { match received_xmr {
Ok(()) => BobState::XmrLocked(state.xmr_locked(monero_wallet_restore_blockheight)), Ok(()) => BobState::XmrLocked(state.xmr_locked(monero_wallet_restore_blockheight)),
Err(monero::InsufficientFunds { expected, actual }) => { Err(monero::InsufficientFunds { expected, actual }) => {
tracing::warn!("Insufficient Monero have been locked! Expected {} but got {}", expected, actual); tracing::warn!(%expected, %actual, "Insufficient Monero have been locked!");
tracing::info!("Waiting for cancel timelock ({}) to expire", state.cancel_timelock); tracing::info!(timelock = %state.cancel_timelock, "Waiting for cancel timelock to expire");
tx_lock_status.wait_until_confirmed_with(state.cancel_timelock).await?; tx_lock_status.wait_until_confirmed_with(state.cancel_timelock).await?;

Loading…
Cancel
Save