mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-01-26 15:27:19 -05:00
Unify monero-wallet-rpc downloader logging
This commit is contained in:
parent
9e33e8b1d1
commit
07101deab1
@ -278,7 +278,7 @@ impl Wallet {
|
|||||||
|
|
||||||
match height {
|
match height {
|
||||||
Err(error) => {
|
Err(error) => {
|
||||||
tracing::warn!(name = %wallet_name_clone, %error, "Failed to get current Monero wallet sync height");
|
tracing::debug!(name = %wallet_name_clone, %error, "Failed to get current Monero wallet sync height");
|
||||||
}
|
}
|
||||||
Ok(height) => {
|
Ok(height) => {
|
||||||
tracing::debug!(name = %wallet_name_clone, current_sync_height = height.height, "Syncing Monero wallet");
|
tracing::debug!(name = %wallet_name_clone, current_sync_height = height.height, "Syncing Monero wallet");
|
||||||
|
@ -221,9 +221,10 @@ impl WalletRpc {
|
|||||||
.parse::<u64>()?;
|
.parse::<u64>()?;
|
||||||
|
|
||||||
tracing::info!(
|
tracing::info!(
|
||||||
"Downloading monero-wallet-rpc ({}) from {}",
|
progress="0%",
|
||||||
content_length.big_byte(2),
|
size=%content_length.big_byte(2),
|
||||||
DOWNLOAD_URL
|
download_url=DOWNLOAD_URL,
|
||||||
|
"Downloading monero-wallet-rpc",
|
||||||
);
|
);
|
||||||
|
|
||||||
let byte_stream = response
|
let byte_stream = response
|
||||||
@ -250,12 +251,24 @@ impl WalletRpc {
|
|||||||
let total = 3 * content_length;
|
let total = 3 * content_length;
|
||||||
let percent = 100 * received as u64 / total;
|
let percent = 100 * received as u64 / total;
|
||||||
if percent != notified && percent % 10 == 0 {
|
if percent != notified && percent % 10 == 0 {
|
||||||
tracing::debug!("{}%", percent);
|
tracing::info!(
|
||||||
|
progress=format!("{}%", percent),
|
||||||
|
size=%content_length.big_byte(2),
|
||||||
|
download_url=DOWNLOAD_URL,
|
||||||
|
"Downloading monero-wallet-rpc",
|
||||||
|
);
|
||||||
notified = percent;
|
notified = percent;
|
||||||
}
|
}
|
||||||
file.write_all(&bytes).await?;
|
file.write_all(&bytes).await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tracing::info!(
|
||||||
|
progress="100%",
|
||||||
|
size=%content_length.big_byte(2),
|
||||||
|
download_url=DOWNLOAD_URL,
|
||||||
|
"Downloading monero-wallet-rpc",
|
||||||
|
);
|
||||||
|
|
||||||
file.flush().await?;
|
file.flush().await?;
|
||||||
|
|
||||||
tracing::debug!("Extracting archive");
|
tracing::debug!("Extracting archive");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user