diff --git a/bin/darkfid/src/lib.rs b/bin/darkfid/src/lib.rs
index d97f18ff0..173b25ae3 100644
--- a/bin/darkfid/src/lib.rs
+++ b/bin/darkfid/src/lib.rs
@@ -21,8 +21,8 @@ use std::{
sync::Arc,
};
-use log::{debug, error, info, warn};
use smol::lock::Mutex;
+use tracing::{debug, error, info, warn};
use url::Url;
use darkfi::{
diff --git a/bin/darkfid/src/main.rs b/bin/darkfid/src/main.rs
index 368f50589..4b4f5cc6d 100644
--- a/bin/darkfid/src/main.rs
+++ b/bin/darkfid/src/main.rs
@@ -18,9 +18,9 @@
use std::sync::Arc;
-use log::{debug, error, info};
use smol::{fs::read_to_string, stream::StreamExt};
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
+use tracing::{debug, error, info};
use url::Url;
use darkfi::{
diff --git a/bin/darkfid/src/proto/mod.rs b/bin/darkfid/src/proto/mod.rs
index c0f6a4108..7f64f5b74 100644
--- a/bin/darkfid/src/proto/mod.rs
+++ b/bin/darkfid/src/proto/mod.rs
@@ -25,7 +25,7 @@ use darkfi::{
validator::ValidatorPtr,
Result,
};
-use log::info;
+use tracing::info;
/// Block proposal broadcast protocol
mod protocol_proposal;
diff --git a/bin/darkfid/src/proto/protocol_proposal.rs b/bin/darkfid/src/proto/protocol_proposal.rs
index b554be760..4b5401408 100644
--- a/bin/darkfid/src/proto/protocol_proposal.rs
+++ b/bin/darkfid/src/proto/protocol_proposal.rs
@@ -19,9 +19,9 @@
use std::{collections::HashSet, sync::Arc};
use async_trait::async_trait;
-use log::{debug, error};
use smol::{channel::Sender, lock::RwLock};
use tinyjson::JsonValue;
+use tracing::{debug, error};
use darkfi::{
impl_p2p_message,
diff --git a/bin/darkfid/src/proto/protocol_sync.rs b/bin/darkfid/src/proto/protocol_sync.rs
index 60d5139ec..45ce28d65 100644
--- a/bin/darkfid/src/proto/protocol_sync.rs
+++ b/bin/darkfid/src/proto/protocol_sync.rs
@@ -19,7 +19,7 @@
use std::sync::Arc;
use async_trait::async_trait;
-use log::{debug, error};
+use tracing::{debug, error};
use darkfi::{
blockchain::{BlockInfo, Header, HeaderHash},
diff --git a/bin/darkfid/src/proto/protocol_tx.rs b/bin/darkfid/src/proto/protocol_tx.rs
index 5c733d57b..0089c7b29 100644
--- a/bin/darkfid/src/proto/protocol_tx.rs
+++ b/bin/darkfid/src/proto/protocol_tx.rs
@@ -18,8 +18,8 @@
use std::sync::Arc;
-use log::{debug, error};
use tinyjson::JsonValue;
+use tracing::{debug, error};
use darkfi::{
net::{
diff --git a/bin/darkfid/src/rpc.rs b/bin/darkfid/src/rpc.rs
index 6f9e9ebdd..c06d055fd 100644
--- a/bin/darkfid/src/rpc.rs
+++ b/bin/darkfid/src/rpc.rs
@@ -19,9 +19,9 @@
use std::{collections::HashSet, time::Instant};
use async_trait::async_trait;
-use log::{debug, error, info, warn};
use smol::lock::MutexGuard;
use tinyjson::JsonValue;
+use tracing::{debug, error, info, warn};
use url::Url;
use darkfi::{
diff --git a/bin/darkfid/src/rpc_blockchain.rs b/bin/darkfid/src/rpc_blockchain.rs
index 4d69fce89..644df4c69 100644
--- a/bin/darkfid/src/rpc_blockchain.rs
+++ b/bin/darkfid/src/rpc_blockchain.rs
@@ -23,8 +23,8 @@ use darkfi_sdk::{
tx::TransactionHash,
};
use darkfi_serial::{deserialize_async, serialize_async};
-use log::{debug, error};
use tinyjson::JsonValue;
+use tracing::{debug, error};
use darkfi::{
rpc::jsonrpc::{
diff --git a/bin/darkfid/src/rpc_tx.rs b/bin/darkfid/src/rpc_tx.rs
index 60646baa3..8371cc0d3 100644
--- a/bin/darkfid/src/rpc_tx.rs
+++ b/bin/darkfid/src/rpc_tx.rs
@@ -17,8 +17,8 @@
*/
use darkfi_serial::deserialize_async;
-use log::{error, warn};
use tinyjson::JsonValue;
+use tracing::{error, warn};
use darkfi::{
rpc::jsonrpc::{
diff --git a/bin/darkfid/src/rpc_xmr.rs b/bin/darkfid/src/rpc_xmr.rs
index 6c97162bb..b0681d66b 100644
--- a/bin/darkfid/src/rpc_xmr.rs
+++ b/bin/darkfid/src/rpc_xmr.rs
@@ -19,8 +19,8 @@
use std::collections::HashMap;
use darkfi::rpc::jsonrpc::{ErrorCode, JsonError, JsonResponse, JsonResult};
-use log::error;
use tinyjson::JsonValue;
+use tracing::error;
use crate::DarkfiNode;
diff --git a/bin/darkfid/src/task/consensus.rs b/bin/darkfid/src/task/consensus.rs
index 111957f4e..f57247250 100644
--- a/bin/darkfid/src/task/consensus.rs
+++ b/bin/darkfid/src/task/consensus.rs
@@ -30,7 +30,7 @@ use darkfi_sdk::{
pasta::{group::ff::PrimeField, pallas},
};
use darkfi_serial::serialize_async;
-use log::{error, info};
+use tracing::{error, info};
use crate::{
task::{garbage_collect_task, miner::MinerRewardsRecipientConfig, miner_task, sync_task},
diff --git a/bin/darkfid/src/task/garbage_collect.rs b/bin/darkfid/src/task/garbage_collect.rs
index 7f5949465..a3a627595 100644
--- a/bin/darkfid/src/task/garbage_collect.rs
+++ b/bin/darkfid/src/task/garbage_collect.rs
@@ -18,7 +18,7 @@
use darkfi::{error::TxVerifyFailed, validator::verification::verify_transactions, Error, Result};
use darkfi_sdk::crypto::MerkleTree;
-use log::{debug, error, info};
+use tracing::{debug, error, info};
use crate::DarkfiNodePtr;
diff --git a/bin/darkfid/src/task/miner.rs b/bin/darkfid/src/task/miner.rs
index 4c9c046d3..8b2e1a8dd 100644
--- a/bin/darkfid/src/task/miner.rs
+++ b/bin/darkfid/src/task/miner.rs
@@ -40,10 +40,10 @@ use darkfi_sdk::{
ContractCall,
};
use darkfi_serial::{serialize_async, Encodable};
-use log::{error, info};
use num_bigint::BigUint;
use rand::rngs::OsRng;
use smol::channel::{Receiver, Sender};
+use tracing::{error, info};
use crate::{proto::ProposalMessage, task::garbage_collect_task, DarkfiNodePtr};
diff --git a/bin/darkfid/src/task/sync.rs b/bin/darkfid/src/task/sync.rs
index f88b5dc2d..68f39e190 100644
--- a/bin/darkfid/src/task/sync.rs
+++ b/bin/darkfid/src/task/sync.rs
@@ -23,9 +23,9 @@ use darkfi::{
util::encoding::base64, validator::consensus::Proposal, Error, Result,
};
use darkfi_serial::serialize_async;
-use log::{debug, info, warn};
use rand::{prelude::SliceRandom, rngs::OsRng};
use tinyjson::JsonValue;
+use tracing::{debug, info, warn};
use crate::{
proto::{
diff --git a/bin/darkfid/src/task/unknown_proposal.rs b/bin/darkfid/src/task/unknown_proposal.rs
index 19b020265..412b90367 100644
--- a/bin/darkfid/src/task/unknown_proposal.rs
+++ b/bin/darkfid/src/task/unknown_proposal.rs
@@ -18,9 +18,9 @@
use std::{collections::HashSet, sync::Arc};
-use log::{debug, error, info};
use smol::{channel::Receiver, lock::RwLock};
use tinyjson::JsonValue;
+use tracing::{debug, error, info};
use darkfi::{
blockchain::BlockDifficulty,
diff --git a/bin/darkirc/src/crypto/rln.rs b/bin/darkirc/src/crypto/rln.rs
index c7b25c1e5..41374cdcf 100644
--- a/bin/darkirc/src/crypto/rln.rs
+++ b/bin/darkirc/src/crypto/rln.rs
@@ -32,8 +32,8 @@ use darkfi_sdk::{
crypto::{pasta_prelude::FromUniformBytes, poseidon_hash, MerkleTree},
pasta::pallas,
};
-use log::info;
use rand::{rngs::OsRng, CryptoRng, RngCore};
+use tracing::info;
pub const RLN_APP_IDENTIFIER: pallas::Base = pallas::Base::from_raw([4242, 0, 0, 0]);
pub const RLN_TRAPDOOR_DERIVATION_PATH: pallas::Base = pallas::Base::from_raw([4211, 0, 0, 0]);
diff --git a/bin/darkirc/src/irc/client.rs b/bin/darkirc/src/irc/client.rs
index 27acd5b2a..04c7e4a97 100644
--- a/bin/darkirc/src/irc/client.rs
+++ b/bin/darkirc/src/irc/client.rs
@@ -39,7 +39,6 @@ use darkfi_sdk::{
};
use darkfi_serial::{deserialize_async, serialize_async};
use futures::FutureExt;
-use log::{debug, error, info, warn};
use sled_overlay::sled;
use smol::{
io::{self, AsyncBufReadExt, AsyncWriteExt, BufReader},
@@ -47,6 +46,7 @@ use smol::{
net::SocketAddr,
prelude::{AsyncRead, AsyncWrite},
};
+use tracing::{debug, error, info, warn};
use super::{
server::{IrcServer, MAX_MSG_LEN},
diff --git a/bin/darkirc/src/irc/command.rs b/bin/darkirc/src/irc/command.rs
index db548103f..09879d1f9 100644
--- a/bin/darkirc/src/irc/command.rs
+++ b/bin/darkirc/src/irc/command.rs
@@ -52,7 +52,7 @@
use std::{collections::HashSet, sync::atomic::Ordering::SeqCst};
use darkfi::Result;
-use log::{error, info};
+use tracing::{error, info};
use super::{
client::{Client, ReplyType},
diff --git a/bin/darkirc/src/irc/server.rs b/bin/darkirc/src/irc/server.rs
index a84c9d9a2..99c84f6f7 100644
--- a/bin/darkirc/src/irc/server.rs
+++ b/bin/darkirc/src/irc/server.rs
@@ -38,7 +38,6 @@ use futures_rustls::{
rustls::{self, pki_types::PrivateKeyDer},
TlsAcceptor,
};
-use log::{debug, error, info, warn};
use sled_overlay::sled;
use smol::{
fs,
@@ -47,6 +46,7 @@ use smol::{
prelude::{AsyncRead, AsyncWrite},
Executor,
};
+use tracing::{debug, error, info, warn};
use url::Url;
use super::{client::Client, IrcChannel, IrcContact, Priv, Privmsg};
diff --git a/bin/darkirc/src/main.rs b/bin/darkirc/src/main.rs
index ce8eac33e..d9d4c38a4 100644
--- a/bin/darkirc/src/main.rs
+++ b/bin/darkirc/src/main.rs
@@ -33,12 +33,12 @@ use darkfi::{
};
use darkfi_sdk::crypto::pasta_prelude::PrimeField;
-use log::{debug, error, info};
use rand::rngs::OsRng;
use settings::list_configured_contacts;
use sled_overlay::sled;
use smol::{fs, lock::Mutex, stream::StreamExt, Executor};
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
+use tracing::{debug, error, info};
use url::Url;
const CONFIG_FILE: &str = "darkirc_config.toml";
diff --git a/bin/darkirc/src/rpc.rs b/bin/darkirc/src/rpc.rs
index 5c417d1f7..29888624d 100644
--- a/bin/darkirc/src/rpc.rs
+++ b/bin/darkirc/src/rpc.rs
@@ -29,8 +29,8 @@ use darkfi::{
},
system::StoppableTaskPtr,
};
-use log::debug;
use smol::lock::MutexGuard;
+use tracing::debug;
use super::DarkIrc;
diff --git a/bin/darkirc/src/settings.rs b/bin/darkirc/src/settings.rs
index 19c0b52e9..9e3ab9bd8 100644
--- a/bin/darkirc/src/settings.rs
+++ b/bin/darkirc/src/settings.rs
@@ -25,7 +25,7 @@ use std::{
use crypto_box::PublicKey;
use darkfi::{Error::ParseFailed, Result};
use darkfi_sdk::{crypto::pasta_prelude::PrimeField, pasta::pallas};
-use log::info;
+use tracing::info;
use crate::{
crypto::rln::{closest_epoch, RlnIdentity},
diff --git a/bin/drk/src/cache.rs b/bin/drk/src/cache.rs
index 16622215a..92bafe92a 100644
--- a/bin/drk/src/cache.rs
+++ b/bin/drk/src/cache.rs
@@ -29,9 +29,9 @@ use darkfi_sdk::{
pasta::pallas,
};
use darkfi_serial::{deserialize, serialize};
-use log::error;
use num_bigint::BigUint;
use sled_overlay::{sled, SledDbOverlay, SledDbOverlayStateDiff};
+use tracing::error;
pub const SLED_SCANNED_BLOCKS_TREE: &[u8] = b"_scanned_blocks";
pub const SLED_STATE_INVERSE_DIFF_TREE: &[u8] = b"_state_inverse_diff";
diff --git a/bin/drk/src/main.rs b/bin/drk/src/main.rs
index 352603ddc..7bb197cb6 100644
--- a/bin/drk/src/main.rs
+++ b/bin/drk/src/main.rs
@@ -22,11 +22,11 @@ use std::{
str::FromStr,
};
-use log::info;
use prettytable::{format, row, Table};
use rand::rngs::OsRng;
use smol::{fs::read_to_string, stream::StreamExt};
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
+use tracing::info;
use url::Url;
use darkfi::{
diff --git a/bin/drk/src/walletdb.rs b/bin/drk/src/walletdb.rs
index a925c3dac..24eaed6e3 100644
--- a/bin/drk/src/walletdb.rs
+++ b/bin/drk/src/walletdb.rs
@@ -21,11 +21,11 @@ use std::{
sync::{Arc, Mutex},
};
-use log::{debug, error};
use rusqlite::{
types::{ToSql, Value},
Connection,
};
+use tracing::{debug, error};
use crate::error::{WalletDbError, WalletDbResult};
diff --git a/bin/explorer/explorerd/src/config.rs b/bin/explorer/explorerd/src/config.rs
index bec598623..ac0751c19 100644
--- a/bin/explorer/explorerd/src/config.rs
+++ b/bin/explorer/explorerd/src/config.rs
@@ -22,9 +22,9 @@ use std::{
str::FromStr,
};
-use log::{debug, error};
use serde::Deserialize;
use structopt::StructOpt;
+use tracing::{debug, error};
use url::Url;
use darkfi::{rpc::settings::RpcSettingsOpt, util::file::load_file, Error, Result};
diff --git a/bin/explorer/explorerd/src/error.rs b/bin/explorer/explorerd/src/error.rs
index 3e69ec3f4..5740233b2 100644
--- a/bin/explorer/explorerd/src/error.rs
+++ b/bin/explorer/explorerd/src/error.rs
@@ -18,7 +18,7 @@
use std::{fmt, sync::Arc};
-use log::error;
+use tracing::error;
use darkfi::{
error::RpcError,
diff --git a/bin/explorer/explorerd/src/main.rs b/bin/explorer/explorerd/src/main.rs
index ac14bbb60..d37c18ba5 100644
--- a/bin/explorer/explorerd/src/main.rs
+++ b/bin/explorer/explorerd/src/main.rs
@@ -18,9 +18,9 @@
use std::{collections::HashSet, path::Path, sync::Arc};
-use log::{error, info};
use smol::{lock::Mutex, stream::StreamExt};
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
+use tracing::{error, info};
use url::Url;
use darkfi::{
diff --git a/bin/explorer/explorerd/src/rpc/mod.rs b/bin/explorer/explorerd/src/rpc/mod.rs
index d22270eb6..08f1df0bc 100644
--- a/bin/explorer/explorerd/src/rpc/mod.rs
+++ b/bin/explorer/explorerd/src/rpc/mod.rs
@@ -19,9 +19,9 @@
use std::{collections::HashSet, sync::Arc, time::Instant};
use async_trait::async_trait;
-use log::{debug, error, trace, warn};
use smol::lock::{MutexGuard, RwLock};
use tinyjson::JsonValue;
+use tracing::{debug, error, trace, warn};
use url::Url;
use darkfi::{
diff --git a/bin/explorer/explorerd/src/service/blocks.rs b/bin/explorer/explorerd/src/service/blocks.rs
index cc4242082..8a95c4b42 100644
--- a/bin/explorer/explorerd/src/service/blocks.rs
+++ b/bin/explorer/explorerd/src/service/blocks.rs
@@ -16,9 +16,9 @@
* along with this program. If not, see .
*/
-use log::{debug, warn};
use sled_overlay::sled::{transaction::ConflictableTransactionError, Transactional};
use tinyjson::JsonValue;
+use tracing::{debug, warn};
use darkfi::{
blockchain::{
diff --git a/bin/explorer/explorerd/src/service/contracts.rs b/bin/explorer/explorerd/src/service/contracts.rs
index ba1032017..174444c6d 100644
--- a/bin/explorer/explorerd/src/service/contracts.rs
+++ b/bin/explorer/explorerd/src/service/contracts.rs
@@ -21,9 +21,9 @@ use std::{
str::FromStr,
};
-use log::info;
use tar::Archive;
use tinyjson::JsonValue;
+use tracing::info;
use darkfi::{
blockchain::BlockchainOverlay, validator::utils::deploy_native_contracts, Error, Result,
diff --git a/bin/explorer/explorerd/src/service/mod.rs b/bin/explorer/explorerd/src/service/mod.rs
index 8c355b892..536eee54a 100644
--- a/bin/explorer/explorerd/src/service/mod.rs
+++ b/bin/explorer/explorerd/src/service/mod.rs
@@ -18,7 +18,7 @@
use std::sync::Arc;
-use log::debug;
+use tracing::debug;
use darkfi::Result;
diff --git a/bin/explorer/explorerd/src/service/sync.rs b/bin/explorer/explorerd/src/service/sync.rs
index 35c49993c..59bb6882b 100644
--- a/bin/explorer/explorerd/src/service/sync.rs
+++ b/bin/explorer/explorerd/src/service/sync.rs
@@ -38,8 +38,8 @@
use std::{sync::Arc, time::Instant};
-use log::{debug, error, info, warn};
use tinyjson::JsonValue;
+use tracing::{debug, error, info, warn};
use url::Url;
use darkfi::{
diff --git a/bin/explorer/explorerd/src/service/transactions.rs b/bin/explorer/explorerd/src/service/transactions.rs
index db2be8ef4..800601b83 100644
--- a/bin/explorer/explorerd/src/service/transactions.rs
+++ b/bin/explorer/explorerd/src/service/transactions.rs
@@ -18,9 +18,9 @@
use std::collections::HashMap;
-use log::{debug, error};
use smol::io::Cursor;
use tinyjson::JsonValue;
+use tracing::{debug, error};
use darkfi::{
blockchain::{
diff --git a/bin/explorer/explorerd/src/store/contract_metadata.rs b/bin/explorer/explorerd/src/store/contract_metadata.rs
index 009e0e1e5..8a856421f 100644
--- a/bin/explorer/explorerd/src/store/contract_metadata.rs
+++ b/bin/explorer/explorerd/src/store/contract_metadata.rs
@@ -18,8 +18,8 @@
use std::sync::{Arc, Mutex, MutexGuard};
-use log::debug;
use sled_overlay::{sled, SledDbOverlay};
+use tracing::debug;
use darkfi::{blockchain::SledDbOverlayPtr, Error, Result};
use darkfi_sdk::crypto::ContractId;
diff --git a/bin/explorer/explorerd/src/store/metrics.rs b/bin/explorer/explorerd/src/store/metrics.rs
index 64c88049a..90a0d9d2d 100644
--- a/bin/explorer/explorerd/src/store/metrics.rs
+++ b/bin/explorer/explorerd/src/store/metrics.rs
@@ -21,8 +21,8 @@ use std::{
sync::{Arc, Mutex, MutexGuard},
};
-use log::{debug, info};
use sled_overlay::{sled, SledDbOverlay};
+use tracing::{debug, info};
use darkfi::{
blockchain::SledDbOverlayPtr,
diff --git a/bin/explorer/explorerd/src/store/mod.rs b/bin/explorer/explorerd/src/store/mod.rs
index 2d31eaa98..a86e6d494 100644
--- a/bin/explorer/explorerd/src/store/mod.rs
+++ b/bin/explorer/explorerd/src/store/mod.rs
@@ -19,8 +19,8 @@
use std::collections::HashMap;
use lazy_static::lazy_static;
-use log::info;
use sled_overlay::sled;
+use tracing::info;
use darkfi::{blockchain::Blockchain, error::Result, util::path::expand_path};
diff --git a/bin/fud/fu/src/main.rs b/bin/fud/fu/src/main.rs
index df26aa2f1..d5cc1dd49 100644
--- a/bin/fud/fu/src/main.rs
+++ b/bin/fud/fu/src/main.rs
@@ -17,8 +17,6 @@
*/
use clap::{Parser, Subcommand};
-use log::error;
-use simplelog::{ColorChoice, TermLogger, TerminalMode};
use smol::lock::RwLock;
use std::{
collections::HashMap,
@@ -26,6 +24,7 @@ use std::{
sync::Arc,
};
use termcolor::{StandardStream, WriteColor};
+use tracing::error;
use url::Url;
use darkfi::{
diff --git a/bin/fud/fud/src/bitcoin.rs b/bin/fud/fud/src/bitcoin.rs
index 4e4881fe2..d325ac690 100644
--- a/bin/fud/fud/src/bitcoin.rs
+++ b/bin/fud/fud/src/bitcoin.rs
@@ -23,11 +23,11 @@ use std::{
time::Duration,
};
-use log::{error, info, warn};
use rand::{prelude::SliceRandom, rngs::OsRng};
use sha2::{Digest, Sha256};
use smol::lock::RwLock;
use tinyjson::JsonValue;
+use tracing::{error, info, warn};
use url::Url;
use darkfi::{
diff --git a/bin/fud/fud/src/dht.rs b/bin/fud/fud/src/dht.rs
index ae7eaed5c..3a8225b80 100644
--- a/bin/fud/fud/src/dht.rs
+++ b/bin/fud/fud/src/dht.rs
@@ -19,9 +19,9 @@
use std::sync::Arc;
use async_trait::async_trait;
-use log::debug;
use num_bigint::BigUint;
use rand::{rngs::OsRng, Rng};
+use tracing::debug;
use url::Url;
use darkfi::{
diff --git a/bin/fud/fud/src/download.rs b/bin/fud/fud/src/download.rs
index bef9edd89..1fde3cf2a 100644
--- a/bin/fud/fud/src/download.rs
+++ b/bin/fud/fud/src/download.rs
@@ -23,11 +23,11 @@ use std::{
};
use futures::{future::FutureExt, pin_mut, select};
-use log::{error, info, warn};
use rand::{
prelude::{IteratorRandom, SliceRandom},
rngs::OsRng,
};
+use tracing::{error, info, warn};
use darkfi::{
dht::DhtNode,
diff --git a/bin/fud/fud/src/lib.rs b/bin/fud/fud/src/lib.rs
index 5481855ef..3201b9c8b 100644
--- a/bin/fud/fud/src/lib.rs
+++ b/bin/fud/fud/src/lib.rs
@@ -23,13 +23,13 @@ use std::{
sync::Arc,
};
-use log::{error, info, warn};
use sled_overlay::sled;
use smol::{
channel,
fs::{self, OpenOptions},
lock::RwLock,
};
+use tracing::{error, info, warn};
use darkfi::{
dht::{tasks as dht_tasks, Dht, DhtHandler, DhtSettings},
diff --git a/bin/fud/fud/src/main.rs b/bin/fud/fud/src/main.rs
index e26ed8c26..6b27ec459 100644
--- a/bin/fud/fud/src/main.rs
+++ b/bin/fud/fud/src/main.rs
@@ -16,11 +16,11 @@
* along with this program. If not, see .
*/
-use log::{debug, error, info, warn};
use sled_overlay::sled;
use smol::{stream::StreamExt, Executor};
use std::sync::Arc;
use structopt_toml::StructOptToml;
+use tracing::{debug, error, info, warn};
use darkfi::{
async_daemonize,
diff --git a/bin/fud/fud/src/pow.rs b/bin/fud/fud/src/pow.rs
index cadf223e9..94b94d32b 100644
--- a/bin/fud/fud/src/pow.rs
+++ b/bin/fud/fud/src/pow.rs
@@ -21,10 +21,10 @@ use std::{
sync::Arc,
};
-use log::info;
use rand::rngs::OsRng;
use smol::lock::RwLock;
use structopt::StructOpt;
+use tracing::info;
use url::Url;
use darkfi::{system::ExecutorPtr, Error, Result};
diff --git a/bin/fud/fud/src/proto.rs b/bin/fud/fud/src/proto.rs
index 28281127d..a37c66e32 100644
--- a/bin/fud/fud/src/proto.rs
+++ b/bin/fud/fud/src/proto.rs
@@ -17,9 +17,9 @@
*/
use async_trait::async_trait;
-use log::{debug, error, info};
use smol::Executor;
use std::{path::StripPrefixError, sync::Arc};
+use tracing::{debug, error, info};
use darkfi::{
dht::DhtHandler,
diff --git a/bin/fud/fud/src/rpc.rs b/bin/fud/fud/src/rpc.rs
index 224980fb3..a9120d668 100644
--- a/bin/fud/fud/src/rpc.rs
+++ b/bin/fud/fud/src/rpc.rs
@@ -17,7 +17,6 @@
*/
use async_trait::async_trait;
-use log::error;
use smol::lock::{Mutex, MutexGuard};
use std::{
collections::{HashMap, HashSet},
@@ -25,6 +24,7 @@ use std::{
sync::Arc,
};
use tinyjson::JsonValue;
+use tracing::error;
use darkfi::{
dht::DhtNode,
diff --git a/bin/fud/fud/src/tasks.rs b/bin/fud/fud/src/tasks.rs
index 4fcedc69f..8437203d0 100644
--- a/bin/fud/fud/src/tasks.rs
+++ b/bin/fud/fud/src/tasks.rs
@@ -18,7 +18,7 @@
use std::sync::Arc;
-use log::{error, info, warn};
+use tracing::{error, info, warn};
use darkfi::{
dht::{DhtHandler, DhtNode},
diff --git a/bin/genev/genev-cli/src/rpc.rs b/bin/genev/genev-cli/src/rpc.rs
index ed3e9401d..bc2e99513 100644
--- a/bin/genev/genev-cli/src/rpc.rs
+++ b/bin/genev/genev-cli/src/rpc.rs
@@ -23,8 +23,8 @@ use darkfi::{
};
use darkfi_serial::{deserialize, serialize};
use genevd::GenEvent;
-use log::debug;
use tinyjson::JsonValue;
+use tracing::debug;
pub struct Gen {
pub rpc_client: RpcClient,
diff --git a/bin/genev/genevd/src/main.rs b/bin/genev/genevd/src/main.rs
index caf851f28..d85ca4120 100644
--- a/bin/genev/genevd/src/main.rs
+++ b/bin/genev/genevd/src/main.rs
@@ -31,10 +31,10 @@ use darkfi::{
util::path::expand_path,
Error, Result,
};
-use log::{debug, error, info};
use sled_overlay::sled;
use smol::{fs, lock::RwLock, stream::StreamExt};
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
+use tracing::{debug, error, info};
mod rpc;
use rpc::JsonRpcInterface;
diff --git a/bin/genev/genevd/src/rpc.rs b/bin/genev/genevd/src/rpc.rs
index 9efdad688..ac343e4fa 100644
--- a/bin/genev/genevd/src/rpc.rs
+++ b/bin/genev/genevd/src/rpc.rs
@@ -19,9 +19,9 @@
use std::collections::HashSet;
use async_trait::async_trait;
-use log::{debug, error};
use smol::lock::{Mutex, MutexGuard};
use tinyjson::JsonValue;
+use tracing::{debug, error};
use darkfi::{
event_graph::{proto::EventPut, Event, EventGraphPtr},
diff --git a/bin/lilith/src/main.rs b/bin/lilith/src/main.rs
index 73e111209..b1d3e1cb1 100644
--- a/bin/lilith/src/main.rs
+++ b/bin/lilith/src/main.rs
@@ -24,7 +24,6 @@ use std::{
};
use async_trait::async_trait;
-use log::{debug, error, info, warn};
use semver::Version;
use smol::{
lock::{Mutex, MutexGuard},
@@ -35,6 +34,7 @@ use structopt::StructOpt;
use structopt_toml::StructOptToml;
use tinyjson::JsonValue;
use toml::Value;
+use tracing::{debug, error, info, warn};
use url::Url;
use darkfi::{
diff --git a/bin/minerd/src/lib.rs b/bin/minerd/src/lib.rs
index 8bfec4162..952df5097 100644
--- a/bin/minerd/src/lib.rs
+++ b/bin/minerd/src/lib.rs
@@ -18,11 +18,11 @@
use std::{collections::HashSet, sync::Arc};
-use log::{error, info};
use smol::{
channel::{Receiver, Sender},
lock::Mutex,
};
+use tracing::{error, info};
use darkfi::{
rpc::{
diff --git a/bin/minerd/src/main.rs b/bin/minerd/src/main.rs
index 98208acd2..266a708ed 100644
--- a/bin/minerd/src/main.rs
+++ b/bin/minerd/src/main.rs
@@ -18,9 +18,9 @@
use std::sync::Arc;
-use log::info;
use smol::{stream::StreamExt, Executor};
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
+use tracing::info;
use darkfi::{async_daemonize, cli_desc, rpc::settings::RpcSettingsOpt, Error, Result};
diff --git a/bin/minerd/src/rpc.rs b/bin/minerd/src/rpc.rs
index b54af69e1..2b48d92d3 100644
--- a/bin/minerd/src/rpc.rs
+++ b/bin/minerd/src/rpc.rs
@@ -18,9 +18,9 @@
use std::collections::HashSet;
-use log::{debug, error, info};
use num_bigint::BigUint;
use smol::lock::MutexGuard;
+use tracing::{debug, error, info};
use darkfi::{
blockchain::BlockInfo,
diff --git a/bin/tau/taud/src/jsonrpc.rs b/bin/tau/taud/src/jsonrpc.rs
index d04768e42..f0f409311 100644
--- a/bin/tau/taud/src/jsonrpc.rs
+++ b/bin/tau/taud/src/jsonrpc.rs
@@ -24,9 +24,9 @@ use std::{
};
use async_trait::async_trait;
-use log::{debug, info, warn};
use smol::lock::{Mutex, MutexGuard};
use tinyjson::JsonValue;
+use tracing::{debug, info, warn};
use darkfi::{
event_graph::EventGraphPtr,
diff --git a/bin/tau/taud/src/main.rs b/bin/tau/taud/src/main.rs
index 67a50999e..1f09d1fa0 100644
--- a/bin/tau/taud/src/main.rs
+++ b/bin/tau/taud/src/main.rs
@@ -36,12 +36,12 @@ use darkfi_serial::{
};
use futures::{select, FutureExt};
use libc::mkfifo;
-use log::{debug, error, info};
use rand::rngs::OsRng;
use sled_overlay::sled;
use smol::{fs, stream::StreamExt};
use structopt_toml::StructOptToml;
use tinyjson::JsonValue;
+use tracing::{debug, error, info};
use darkfi::{
async_daemonize,
diff --git a/bin/tau/taud/src/month_tasks.rs b/bin/tau/taud/src/month_tasks.rs
index bced258fb..e09152e47 100644
--- a/bin/tau/taud/src/month_tasks.rs
+++ b/bin/tau/taud/src/month_tasks.rs
@@ -23,8 +23,8 @@ use std::{
};
use chrono::{TimeZone, Utc};
-use log::debug;
use tinyjson::JsonValue;
+use tracing::debug;
use darkfi::util::{
file::{load_json_file, save_json_file},
diff --git a/bin/tau/taud/src/task_info.rs b/bin/tau/taud/src/task_info.rs
index d62de6dd6..da6a42034 100644
--- a/bin/tau/taud/src/task_info.rs
+++ b/bin/tau/taud/src/task_info.rs
@@ -24,8 +24,8 @@ use std::{
};
use darkfi_serial::{async_trait, SerialDecodable, SerialEncodable};
-use log::debug;
use tinyjson::JsonValue;
+use tracing::debug;
use darkfi::{
util::{
diff --git a/bin/tau/taud/src/util.rs b/bin/tau/taud/src/util.rs
index a73071cfe..6e35642c6 100644
--- a/bin/tau/taud/src/util.rs
+++ b/bin/tau/taud/src/util.rs
@@ -22,7 +22,7 @@ use std::{
path::Path,
};
-use log::debug;
+use tracing::debug;
use darkfi::{Error, Result};
use rand::{distributions::Alphanumeric, rngs::OsRng, Rng};
diff --git a/example/dchat/dchatd/src/main.rs b/example/dchat/dchatd/src/main.rs
index c00b6917c..844467378 100644
--- a/example/dchat/dchatd/src/main.rs
+++ b/example/dchat/dchatd/src/main.rs
@@ -17,9 +17,9 @@
*/
// ANCHOR: imports
-use log::{debug, error, info};
use smol::{lock::Mutex, stream::StreamExt};
use std::{collections::HashSet, sync::Arc};
+use tracing::{debug, error, info};
use darkfi::{
async_daemonize, cli_desc, net,
diff --git a/example/dchat/dchatd/src/protocol_dchat.rs b/example/dchat/dchatd/src/protocol_dchat.rs
index f03c1adab..0ee4ba580 100644
--- a/example/dchat/dchatd/src/protocol_dchat.rs
+++ b/example/dchat/dchatd/src/protocol_dchat.rs
@@ -19,9 +19,9 @@
// ANCHOR: protocol_dchat
use async_trait::async_trait;
use darkfi::{net, Result};
-use log::debug;
use smol::Executor;
use std::sync::Arc;
+use tracing::debug;
use crate::dchatmsg::{DchatMsg, DchatMsgsBuffer};
diff --git a/example/dchat/dchatd/src/rpc.rs b/example/dchat/dchatd/src/rpc.rs
index c36f1342c..97f70fcc4 100644
--- a/example/dchat/dchatd/src/rpc.rs
+++ b/example/dchat/dchatd/src/rpc.rs
@@ -18,9 +18,9 @@
use async_trait::async_trait;
use darkfi::{net::P2pPtr, system::StoppableTaskPtr};
-use log::debug;
use smol::lock::MutexGuard;
use std::collections::HashSet;
+use tracing::debug;
use darkfi::rpc::{
jsonrpc::{ErrorCode, JsonError, JsonRequest, JsonResponse, JsonResult},
diff --git a/script/evgrd/bin/evgrd.rs b/script/evgrd/bin/evgrd.rs
index 26a39e684..d435e5d2f 100644
--- a/script/evgrd/bin/evgrd.rs
+++ b/script/evgrd/bin/evgrd.rs
@@ -39,7 +39,7 @@ use darkfi::{
};
use darkfi_serial::{AsyncDecodable, AsyncEncodable};
use futures::{FutureExt, AsyncWriteExt};
-use log::{debug, error, info};
+use tracing::{debug, error, info};
use sled_overlay::sled;
use smol::{fs, lock::Mutex, stream::StreamExt, Executor};
use std::{collections::HashSet, path::PathBuf, sync::Arc};
diff --git a/script/evgrd/bin/rpc.rs b/script/evgrd/bin/rpc.rs
index 757bcd3ed..0161ffdb5 100644
--- a/script/evgrd/bin/rpc.rs
+++ b/script/evgrd/bin/rpc.rs
@@ -29,7 +29,7 @@ use darkfi::{
},
system::StoppableTaskPtr,
};
-use log::debug;
+use tracing::debug;
use smol::lock::MutexGuard;
use super::Daemon;
diff --git a/script/evgrd/example/recv.rs b/script/evgrd/example/recv.rs
index bf1b9fde2..c6b374021 100644
--- a/script/evgrd/example/recv.rs
+++ b/script/evgrd/example/recv.rs
@@ -26,7 +26,7 @@ use darkfi_serial::{
async_trait, deserialize_async_partial, AsyncDecodable, AsyncEncodable, SerialDecodable,
SerialEncodable,
};
-use log::{error, info};
+use tracing::{error, info};
use sled_overlay::sled;
use smol::fs;
use url::Url;
diff --git a/script/evgrd/src/lib.rs b/script/evgrd/src/lib.rs
index f3f4a4602..822c8dec1 100644
--- a/script/evgrd/src/lib.rs
+++ b/script/evgrd/src/lib.rs
@@ -27,7 +27,7 @@ use darkfi::{
use darkfi_serial::{
async_trait, deserialize_async, serialize_async, SerialDecodable, SerialEncodable,
};
-use log::{debug, error, info};
+use tracing::{debug, error, info};
use sled_overlay::{sled, SledTreeOverlay};
use smol::{
lock::{OnceCell, RwLock},
diff --git a/script/research/blockchain-storage-metrics/src/main.rs b/script/research/blockchain-storage-metrics/src/main.rs
index 4cd11de06..a6df6173f 100644
--- a/script/research/blockchain-storage-metrics/src/main.rs
+++ b/script/research/blockchain-storage-metrics/src/main.rs
@@ -18,9 +18,9 @@
use std::{fmt, sync::Arc};
-use log::info;
use smol::stream::StreamExt;
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
+use tracing::info;
use url::Url;
use darkfi::{
diff --git a/script/research/dam/dam-cli/src/rpc.rs b/script/research/dam/dam-cli/src/rpc.rs
index 544ffdd39..99cbcbfc1 100644
--- a/script/research/dam/dam-cli/src/rpc.rs
+++ b/script/research/dam/dam-cli/src/rpc.rs
@@ -27,7 +27,7 @@ use darkfi::{
system::{ExecutorPtr, Publisher, StoppableTask},
Error, Result,
};
-use log::{error, info};
+use tracing::{error, info};
use url::Url;
use crate::DamCli;
diff --git a/script/research/dam/damd/src/flooder.rs b/script/research/dam/damd/src/flooder.rs
index be1c175c1..5072f3f27 100644
--- a/script/research/dam/damd/src/flooder.rs
+++ b/script/research/dam/damd/src/flooder.rs
@@ -27,9 +27,9 @@ use darkfi::{
system::{ExecutorPtr, StoppableTask, StoppableTaskPtr},
Error, Result,
};
-use log::{debug, error, info};
use smol::lock::Mutex;
use tinyjson::JsonValue;
+use tracing::{debug, error, info};
use crate::proto::{
protocol_bar::Bar,
diff --git a/script/research/dam/damd/src/lib.rs b/script/research/dam/damd/src/lib.rs
index 72cef600e..19f73f149 100644
--- a/script/research/dam/damd/src/lib.rs
+++ b/script/research/dam/damd/src/lib.rs
@@ -21,8 +21,8 @@ use std::{
sync::Arc,
};
-use log::{debug, error, info};
use smol::lock::Mutex;
+use tracing::{debug, error, info};
use darkfi::{
net::settings::Settings,
diff --git a/script/research/dam/damd/src/main.rs b/script/research/dam/damd/src/main.rs
index 15e15224c..8e5be1e26 100644
--- a/script/research/dam/damd/src/main.rs
+++ b/script/research/dam/damd/src/main.rs
@@ -19,9 +19,9 @@
use std::sync::Arc;
use async_std::prelude::StreamExt;
-use log::info;
use smol::Executor;
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
+use tracing::info;
use darkfi::{
async_daemonize, cli_desc, net::settings::SettingsOpt, rpc::settings::RpcSettingsOpt, Error,
diff --git a/script/research/dam/damd/src/proto/mod.rs b/script/research/dam/damd/src/proto/mod.rs
index dc6cca47f..1a1045e22 100644
--- a/script/research/dam/damd/src/proto/mod.rs
+++ b/script/research/dam/damd/src/proto/mod.rs
@@ -24,7 +24,7 @@ use darkfi::{
system::ExecutorPtr,
Result,
};
-use log::info;
+use tracing::info;
/// `Foo` messages broadcast protocol
pub mod protocol_foo;
diff --git a/script/research/dam/damd/src/proto/protocol_bar.rs b/script/research/dam/damd/src/proto/protocol_bar.rs
index eefa049ed..1bc385121 100644
--- a/script/research/dam/damd/src/proto/protocol_bar.rs
+++ b/script/research/dam/damd/src/proto/protocol_bar.rs
@@ -19,8 +19,8 @@
use std::sync::Arc;
use async_trait::async_trait;
-use log::{debug, error, info};
use tinyjson::JsonValue;
+use tracing::{debug, error, info};
use darkfi::{
impl_p2p_message,
diff --git a/script/research/dam/damd/src/proto/protocol_foo.rs b/script/research/dam/damd/src/proto/protocol_foo.rs
index 3f6b85cc5..7709add5b 100644
--- a/script/research/dam/damd/src/proto/protocol_foo.rs
+++ b/script/research/dam/damd/src/proto/protocol_foo.rs
@@ -19,8 +19,8 @@
use std::sync::Arc;
use async_trait::async_trait;
-use log::{debug, error, info};
use tinyjson::JsonValue;
+use tracing::{debug, error, info};
use darkfi::{
impl_p2p_message,
diff --git a/script/research/dam/damd/src/rpc.rs b/script/research/dam/damd/src/rpc.rs
index e60d68688..7f701a370 100644
--- a/script/research/dam/damd/src/rpc.rs
+++ b/script/research/dam/damd/src/rpc.rs
@@ -19,8 +19,8 @@
use std::collections::HashSet;
use async_trait::async_trait;
-use log::debug;
use smol::lock::MutexGuard;
+use tracing::debug;
use darkfi::{
net::P2pPtr,
diff --git a/script/research/generic-node/src/main.rs b/script/research/generic-node/src/main.rs
index bc5eb7736..269d1301c 100644
--- a/script/research/generic-node/src/main.rs
+++ b/script/research/generic-node/src/main.rs
@@ -18,7 +18,7 @@
use std::{collections::HashSet, sync::Arc};
-use log::{error, info};
+use tracing::{error, info};
use rand::{rngs::OsRng, Rng};
use smol::{stream::StreamExt, Executor};
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
diff --git a/script/research/rlnd/rlnd/src/lib.rs b/script/research/rlnd/rlnd/src/lib.rs
index 259d028da..04b609772 100644
--- a/script/research/rlnd/rlnd/src/lib.rs
+++ b/script/research/rlnd/rlnd/src/lib.rs
@@ -18,8 +18,8 @@
use std::{collections::HashSet, sync::Arc};
-use log::{error, info};
use smol::lock::Mutex;
+use tracing::{error, info};
use url::Url;
use darkfi::{
diff --git a/script/research/rlnd/rlnd/src/main.rs b/script/research/rlnd/rlnd/src/main.rs
index 1a417a3de..94cbb6f93 100644
--- a/script/research/rlnd/rlnd/src/main.rs
+++ b/script/research/rlnd/rlnd/src/main.rs
@@ -19,8 +19,8 @@
use std::sync::Arc;
use async_std::prelude::StreamExt;
-use log::info;
use structopt_toml::{serde::Deserialize, structopt::StructOpt, StructOptToml};
+use tracing::info;
use url::Url;
use darkfi::{async_daemonize, cli_desc, rpc::settings::RpcSettingsOpt, Error, Result};
diff --git a/script/research/rlnd/rlnd/src/rpc.rs b/script/research/rlnd/rlnd/src/rpc.rs
index 27e634f77..b4869a284 100644
--- a/script/research/rlnd/rlnd/src/rpc.rs
+++ b/script/research/rlnd/rlnd/src/rpc.rs
@@ -30,9 +30,9 @@ use darkfi::{
};
use darkfi_sdk::{crypto::pasta_prelude::PrimeField, pasta::pallas};
use darkfi_serial::serialize;
-use log::{debug, error, info};
use smol::lock::MutexGuard;
use tinyjson::JsonValue;
+use tracing::{debug, error, info};
use url::Url;
use crate::{
diff --git a/src/blockchain/contract_store.rs b/src/blockchain/contract_store.rs
index 6d8dbcb59..ffd1be9f7 100644
--- a/src/blockchain/contract_store.rs
+++ b/src/blockchain/contract_store.rs
@@ -26,8 +26,8 @@ use darkfi_sdk::{
monotree::Monotree,
};
use darkfi_serial::{deserialize, serialize};
-use log::{debug, error};
use sled_overlay::{serial::parse_record, sled, SledDbOverlay};
+use tracing::{debug, error};
use crate::{
zk::{empty_witnesses, VerifyingKey, ZkCircuit},
diff --git a/src/blockchain/mod.rs b/src/blockchain/mod.rs
index 205541bd6..81ebe5115 100644
--- a/src/blockchain/mod.rs
+++ b/src/blockchain/mod.rs
@@ -19,8 +19,8 @@
use std::sync::{Arc, Mutex};
use darkfi_sdk::{monotree::Monotree, tx::TransactionHash};
-use log::debug;
use sled_overlay::{sled, sled::Transactional};
+use tracing::debug;
use crate::{tx::Transaction, util::time::Timestamp, Error, Result};
diff --git a/src/contract/dao/src/client/exec.rs b/src/contract/dao/src/client/exec.rs
index 8044425e2..83f1bb692 100644
--- a/src/contract/dao/src/client/exec.rs
+++ b/src/contract/dao/src/client/exec.rs
@@ -21,8 +21,8 @@ use darkfi_sdk::{
pasta::pallas,
};
-use log::debug;
use rand::rngs::OsRng;
+use tracing::debug;
use darkfi::{
zk::{halo2::Value, Proof, ProvingKey, Witness, ZkCircuit},
diff --git a/src/contract/dao/src/client/mint.rs b/src/contract/dao/src/client/mint.rs
index 3ea7101b5..f8d10c5da 100644
--- a/src/contract/dao/src/client/mint.rs
+++ b/src/contract/dao/src/client/mint.rs
@@ -22,8 +22,8 @@ use darkfi::{
Result,
};
use darkfi_sdk::{crypto::SecretKey, pasta::pallas};
-use log::debug;
use rand::rngs::OsRng;
+use tracing::debug;
use crate::model::{Dao, DaoMintParams};
diff --git a/src/contract/dao/src/client/vote.rs b/src/contract/dao/src/client/vote.rs
index 3af2a93f7..58205a83d 100644
--- a/src/contract/dao/src/client/vote.rs
+++ b/src/contract/dao/src/client/vote.rs
@@ -30,8 +30,8 @@ use darkfi_sdk::{
},
pasta::pallas,
};
-use log::debug;
use rand::rngs::OsRng;
+use tracing::debug;
use darkfi::{
zk::{halo2::Value, Proof, ProvingKey, Witness, ZkCircuit},
diff --git a/src/contract/dao/tests/integration.rs b/src/contract/dao/tests/integration.rs
index 1b577d2ef..c9a853c9a 100644
--- a/src/contract/dao/tests/integration.rs
+++ b/src/contract/dao/tests/integration.rs
@@ -37,8 +37,8 @@ use darkfi_sdk::{
},
pasta::pallas,
};
-use log::info;
use rand::rngs::OsRng;
+use tracing::info;
// Integration test configuration
// Holders this test will use:
diff --git a/src/contract/deployooor/src/client/deploy_v1.rs b/src/contract/deployooor/src/client/deploy_v1.rs
index 68b29f317..a3786813e 100644
--- a/src/contract/deployooor/src/client/deploy_v1.rs
+++ b/src/contract/deployooor/src/client/deploy_v1.rs
@@ -18,7 +18,7 @@
use darkfi::{ClientFailed, Result};
use darkfi_sdk::{crypto::Keypair, deploy::DeployParamsV1};
-use log::{debug, error};
+use tracing::{debug, error};
use crate::error::DeployError;
diff --git a/src/contract/deployooor/src/client/lock_v1.rs b/src/contract/deployooor/src/client/lock_v1.rs
index de857160f..5b43796a0 100644
--- a/src/contract/deployooor/src/client/lock_v1.rs
+++ b/src/contract/deployooor/src/client/lock_v1.rs
@@ -18,7 +18,7 @@
use darkfi::Result;
use darkfi_sdk::crypto::Keypair;
-use log::debug;
+use tracing::debug;
use crate::model::LockParamsV1;
diff --git a/src/contract/deployooor/tests/integration.rs b/src/contract/deployooor/tests/integration.rs
index c9a1de11e..62c3dfa92 100644
--- a/src/contract/deployooor/tests/integration.rs
+++ b/src/contract/deployooor/tests/integration.rs
@@ -18,7 +18,7 @@
use darkfi::Result;
use darkfi_contract_test_harness::{init_logger, Holder, TestHarness};
-use log::info;
+use tracing::info;
#[test]
fn deploy_integration() -> Result<()> {
diff --git a/src/contract/money/src/client/auth_token_freeze_v1.rs b/src/contract/money/src/client/auth_token_freeze_v1.rs
index a61a29988..a8a2523cc 100644
--- a/src/contract/money/src/client/auth_token_freeze_v1.rs
+++ b/src/contract/money/src/client/auth_token_freeze_v1.rs
@@ -22,8 +22,8 @@ use darkfi::{
Result,
};
use darkfi_sdk::crypto::Keypair;
-use log::debug;
use rand::rngs::OsRng;
+use tracing::debug;
use crate::model::{MoneyAuthTokenFreezeParamsV1, TokenAttributes};
diff --git a/src/contract/money/src/client/auth_token_mint_v1.rs b/src/contract/money/src/client/auth_token_mint_v1.rs
index fea5aca3a..dc0e1fd19 100644
--- a/src/contract/money/src/client/auth_token_mint_v1.rs
+++ b/src/contract/money/src/client/auth_token_mint_v1.rs
@@ -22,8 +22,8 @@ use darkfi::{
Result,
};
use darkfi_sdk::crypto::{note::AeadEncryptedNote, Blind, Keypair};
-use log::debug;
use rand::rngs::OsRng;
+use tracing::debug;
use crate::{
client::MoneyNote,
diff --git a/src/contract/money/src/client/genesis_mint_v1.rs b/src/contract/money/src/client/genesis_mint_v1.rs
index b60e2c079..a3fe41cec 100644
--- a/src/contract/money/src/client/genesis_mint_v1.rs
+++ b/src/contract/money/src/client/genesis_mint_v1.rs
@@ -25,8 +25,8 @@ use darkfi_sdk::{
crypto::{note::AeadEncryptedNote, pasta_prelude::*, Blind, FuncId, PublicKey},
pasta::pallas,
};
-use log::debug;
use rand::{prelude::SliceRandom, rngs::OsRng};
+use tracing::debug;
use crate::{
client::{
diff --git a/src/contract/money/src/client/pow_reward_v1.rs b/src/contract/money/src/client/pow_reward_v1.rs
index 2ac28c3fb..402e0a9af 100644
--- a/src/contract/money/src/client/pow_reward_v1.rs
+++ b/src/contract/money/src/client/pow_reward_v1.rs
@@ -26,8 +26,8 @@ use darkfi_sdk::{
crypto::{note::AeadEncryptedNote, pasta_prelude::*, Blind, FuncId, PublicKey},
pasta::pallas,
};
-use log::debug;
use rand::rngs::OsRng;
+use tracing::debug;
use crate::{
client::{
diff --git a/src/contract/money/src/client/swap_v1.rs b/src/contract/money/src/client/swap_v1.rs
index 4d8e2a1c2..44b24aef0 100644
--- a/src/contract/money/src/client/swap_v1.rs
+++ b/src/contract/money/src/client/swap_v1.rs
@@ -31,8 +31,8 @@ use darkfi_sdk::{
pasta::pallas,
};
use darkfi_serial::serialize;
-use log::{debug, error};
use rand::rngs::OsRng;
+use tracing::{debug, error};
use crate::{
client::{
diff --git a/src/contract/money/src/client/token_mint_v1.rs b/src/contract/money/src/client/token_mint_v1.rs
index 3b322e0fa..802a55566 100644
--- a/src/contract/money/src/client/token_mint_v1.rs
+++ b/src/contract/money/src/client/token_mint_v1.rs
@@ -22,8 +22,8 @@ use darkfi::{
Result,
};
use darkfi_sdk::pasta::pallas;
-use log::debug;
use rand::rngs::OsRng;
+use tracing::debug;
use crate::model::{CoinAttributes, MoneyTokenMintParamsV1, TokenAttributes};
diff --git a/src/contract/money/src/client/transfer_v1/builder.rs b/src/contract/money/src/client/transfer_v1/builder.rs
index a3ac0fd99..da1edf0dd 100644
--- a/src/contract/money/src/client/transfer_v1/builder.rs
+++ b/src/contract/money/src/client/transfer_v1/builder.rs
@@ -28,8 +28,8 @@ use darkfi_sdk::{
},
pasta::pallas,
};
-use log::debug;
use rand::rngs::OsRng;
+use tracing::debug;
use super::proof::{create_transfer_burn_proof, create_transfer_mint_proof};
use crate::{
diff --git a/src/contract/money/src/client/transfer_v1/mod.rs b/src/contract/money/src/client/transfer_v1/mod.rs
index 279988b5e..7c0b79039 100644
--- a/src/contract/money/src/client/transfer_v1/mod.rs
+++ b/src/contract/money/src/client/transfer_v1/mod.rs
@@ -21,8 +21,8 @@ use darkfi_sdk::{
crypto::{pasta_prelude::*, Blind, FuncId, Keypair, MerkleTree, PublicKey},
pasta::pallas,
};
-use log::{debug, error};
use rand::{prelude::SliceRandom, rngs::OsRng};
+use tracing::{debug, error};
use crate::{
client::OwnCoin,
diff --git a/src/contract/money/src/client/transfer_v1/proof.rs b/src/contract/money/src/client/transfer_v1/proof.rs
index da11a51d8..205aab174 100644
--- a/src/contract/money/src/client/transfer_v1/proof.rs
+++ b/src/contract/money/src/client/transfer_v1/proof.rs
@@ -29,8 +29,8 @@ use darkfi_sdk::{
},
pasta::pallas,
};
-use log::debug;
use rand::rngs::OsRng;
+use tracing::debug;
use super::{TransferCallInput, TransferCallOutput};
use crate::model::{Coin, CoinAttributes, Nullifier};
diff --git a/src/contract/money/tests/genesis_mint.rs b/src/contract/money/tests/genesis_mint.rs
index c18a29072..2f72c0ee5 100644
--- a/src/contract/money/tests/genesis_mint.rs
+++ b/src/contract/money/tests/genesis_mint.rs
@@ -27,7 +27,7 @@
use darkfi::Result;
use darkfi_contract_test_harness::{init_logger, Holder, TestHarness};
-use log::info;
+use tracing::info;
#[test]
fn genesis_mint() -> Result<()> {
diff --git a/src/contract/money/tests/mint_pay_swap.rs b/src/contract/money/tests/mint_pay_swap.rs
index e0d0e60b1..642c9b722 100644
--- a/src/contract/money/tests/mint_pay_swap.rs
+++ b/src/contract/money/tests/mint_pay_swap.rs
@@ -30,8 +30,8 @@
use darkfi::Result;
use darkfi_contract_test_harness::{init_logger, Holder, TestHarness};
use darkfi_sdk::crypto::BaseBlind;
-use log::info;
use rand::rngs::OsRng;
+use tracing::info;
#[test]
fn mint_pay_swap() -> Result<()> {
diff --git a/src/contract/money/tests/token_mint.rs b/src/contract/money/tests/token_mint.rs
index 2ea77b634..e93e788cf 100644
--- a/src/contract/money/tests/token_mint.rs
+++ b/src/contract/money/tests/token_mint.rs
@@ -19,8 +19,8 @@
use darkfi::Result;
use darkfi_contract_test_harness::{init_logger, Holder, TestHarness};
use darkfi_sdk::crypto::BaseBlind;
-use log::info;
use rand::rngs::OsRng;
+use tracing::info;
#[test]
fn token_mint() -> Result<()> {
diff --git a/src/contract/test-harness/src/contract_deploy.rs b/src/contract/test-harness/src/contract_deploy.rs
index 70781a9a1..31bebc7a4 100644
--- a/src/contract/test-harness/src/contract_deploy.rs
+++ b/src/contract/test-harness/src/contract_deploy.rs
@@ -31,7 +31,7 @@ use darkfi_sdk::{
ContractCall,
};
use darkfi_serial::AsyncEncodable;
-use log::debug;
+use tracing::debug;
use super::{Holder, TestHarness};
diff --git a/src/contract/test-harness/src/contract_lock.rs b/src/contract/test-harness/src/contract_lock.rs
index e4074f9ef..8925da41b 100644
--- a/src/contract/test-harness/src/contract_lock.rs
+++ b/src/contract/test-harness/src/contract_lock.rs
@@ -33,7 +33,7 @@ use darkfi_sdk::{
ContractCall,
};
use darkfi_serial::AsyncEncodable;
-use log::debug;
+use tracing::debug;
use super::{Holder, TestHarness};
diff --git a/src/contract/test-harness/src/dao_exec.rs b/src/contract/test-harness/src/dao_exec.rs
index 5d61fa4a4..2930152fa 100644
--- a/src/contract/test-harness/src/dao_exec.rs
+++ b/src/contract/test-harness/src/dao_exec.rs
@@ -42,8 +42,8 @@ use darkfi_sdk::{
ContractCall,
};
use darkfi_serial::AsyncEncodable;
-use log::debug;
use rand::rngs::OsRng;
+use tracing::debug;
use super::{Holder, TestHarness};
diff --git a/src/contract/test-harness/src/dao_mint.rs b/src/contract/test-harness/src/dao_mint.rs
index cdef106df..d82f06597 100644
--- a/src/contract/test-harness/src/dao_mint.rs
+++ b/src/contract/test-harness/src/dao_mint.rs
@@ -34,7 +34,7 @@ use darkfi_sdk::{
ContractCall,
};
use darkfi_serial::AsyncEncodable;
-use log::debug;
+use tracing::debug;
use super::{Holder, TestHarness};
diff --git a/src/contract/test-harness/src/dao_propose.rs b/src/contract/test-harness/src/dao_propose.rs
index 5c843e755..785bb3beb 100644
--- a/src/contract/test-harness/src/dao_propose.rs
+++ b/src/contract/test-harness/src/dao_propose.rs
@@ -40,8 +40,8 @@ use darkfi_sdk::{
ContractCall,
};
use darkfi_serial::AsyncEncodable;
-use log::debug;
use rand::rngs::OsRng;
+use tracing::debug;
use super::{Holder, TestHarness};
diff --git a/src/contract/test-harness/src/dao_vote.rs b/src/contract/test-harness/src/dao_vote.rs
index 472eda3ff..5cce1ecf3 100644
--- a/src/contract/test-harness/src/dao_vote.rs
+++ b/src/contract/test-harness/src/dao_vote.rs
@@ -35,8 +35,8 @@ use darkfi_sdk::{
ContractCall,
};
use darkfi_serial::AsyncEncodable;
-use log::debug;
use rand::rngs::OsRng;
+use tracing::debug;
use super::{Holder, TestHarness};
diff --git a/src/contract/test-harness/src/lib.rs b/src/contract/test-harness/src/lib.rs
index 55bfbe653..f2822169f 100644
--- a/src/contract/test-harness/src/lib.rs
+++ b/src/contract/test-harness/src/lib.rs
@@ -42,9 +42,9 @@ use darkfi_sdk::{
pasta::pallas,
};
use darkfi_serial::Encodable;
-use log::debug;
use num_bigint::BigUint;
use sled_overlay::sled;
+use tracing::debug;
/// Utility module for caching ZK proof PKs and VKs
pub mod vks;
diff --git a/src/contract/test-harness/src/money_fee.rs b/src/contract/test-harness/src/money_fee.rs
index 5f00b6178..9ad6cd562 100644
--- a/src/contract/test-harness/src/money_fee.rs
+++ b/src/contract/test-harness/src/money_fee.rs
@@ -42,8 +42,8 @@ use darkfi_sdk::{
ContractCall,
};
use darkfi_serial::AsyncEncodable;
-use log::{debug, info};
use rand::rngs::OsRng;
+use tracing::{debug, info};
use super::{Holder, TestHarness};
diff --git a/src/contract/test-harness/src/money_genesis_mint.rs b/src/contract/test-harness/src/money_genesis_mint.rs
index 38f42f1b5..e780eb15a 100644
--- a/src/contract/test-harness/src/money_genesis_mint.rs
+++ b/src/contract/test-harness/src/money_genesis_mint.rs
@@ -31,7 +31,7 @@ use darkfi_sdk::{
ContractCall,
};
use darkfi_serial::AsyncEncodable;
-use log::debug;
+use tracing::debug;
use super::{Holder, TestHarness};
diff --git a/src/contract/test-harness/src/money_otc_swap.rs b/src/contract/test-harness/src/money_otc_swap.rs
index c8d3c455b..e3937a122 100644
--- a/src/contract/test-harness/src/money_otc_swap.rs
+++ b/src/contract/test-harness/src/money_otc_swap.rs
@@ -32,8 +32,8 @@ use darkfi_sdk::{
ContractCall,
};
use darkfi_serial::AsyncEncodable;
-use log::debug;
use rand::rngs::OsRng;
+use tracing::debug;
use super::{Holder, TestHarness};
diff --git a/src/contract/test-harness/src/money_pow_reward.rs b/src/contract/test-harness/src/money_pow_reward.rs
index 8fc95af6e..05ffc2bd9 100644
--- a/src/contract/test-harness/src/money_pow_reward.rs
+++ b/src/contract/test-harness/src/money_pow_reward.rs
@@ -32,7 +32,7 @@ use darkfi_sdk::{
ContractCall,
};
use darkfi_serial::AsyncEncodable;
-use log::info;
+use tracing::info;
use super::{Holder, TestHarness};
diff --git a/src/contract/test-harness/src/money_token.rs b/src/contract/test-harness/src/money_token.rs
index b309f5f65..13a340e19 100644
--- a/src/contract/test-harness/src/money_token.rs
+++ b/src/contract/test-harness/src/money_token.rs
@@ -40,8 +40,8 @@ use darkfi_sdk::{
ContractCall,
};
use darkfi_serial::AsyncEncodable;
-use log::debug;
use rand::rngs::OsRng;
+use tracing::debug;
use super::{Holder, TestHarness};
diff --git a/src/contract/test-harness/src/money_transfer.rs b/src/contract/test-harness/src/money_transfer.rs
index 843242ee4..600e3270c 100644
--- a/src/contract/test-harness/src/money_transfer.rs
+++ b/src/contract/test-harness/src/money_transfer.rs
@@ -30,7 +30,7 @@ use darkfi_sdk::{
ContractCall,
};
use darkfi_serial::AsyncEncodable;
-use log::debug;
+use tracing::debug;
use super::{Holder, TestHarness};
diff --git a/src/contract/test-harness/src/vks.rs b/src/contract/test-harness/src/vks.rs
index c612598f2..b35417118 100644
--- a/src/contract/test-harness/src/vks.rs
+++ b/src/contract/test-harness/src/vks.rs
@@ -45,8 +45,8 @@ use darkfi_sdk::crypto::contract_id::{
};
use darkfi_serial::{deserialize, serialize};
-use log::debug;
use sled_overlay::sled;
+use tracing::debug;
/// Update these if any circuits are changed.
/// Delete the existing cachefiles, and enable debug logging, you will see the new hashes.
diff --git a/src/dht/mod.rs b/src/dht/mod.rs
index c914cb92a..ebe4091ea 100644
--- a/src/dht/mod.rs
+++ b/src/dht/mod.rs
@@ -27,12 +27,12 @@ use std::{
};
use futures::stream::FuturesUnordered;
-use log::{debug, info, warn};
use num_bigint::BigUint;
use smol::{
lock::{RwLock, Semaphore},
stream::StreamExt,
};
+use tracing::{debug, info, warn};
use url::Url;
use crate::{
diff --git a/src/dht/tasks.rs b/src/dht/tasks.rs
index 10b7b0f2e..eb0eeb74e 100644
--- a/src/dht/tasks.rs
+++ b/src/dht/tasks.rs
@@ -16,8 +16,8 @@
* along with this program. If not, see .
*/
-use log::warn;
use std::sync::Arc;
+use tracing::warn;
use crate::{
dht::{ChannelCacheItem, DhtHandler, DhtNode},
diff --git a/src/event_graph/mod.rs b/src/event_graph/mod.rs
index 2278343c9..949cac844 100644
--- a/src/event_graph/mod.rs
+++ b/src/event_graph/mod.rs
@@ -23,7 +23,6 @@ use std::{
};
use darkfi_serial::{deserialize_async, serialize_async};
-use log::{debug, error, info, warn};
use num_bigint::BigUint;
use sled_overlay::{sled, SledTreeOverlay};
use smol::{
@@ -31,6 +30,7 @@ use smol::{
Executor,
};
use tinyjson::JsonValue::{self};
+use tracing::{debug, error, info, warn};
use crate::{
event_graph::util::replayer_log,
diff --git a/src/event_graph/proto.rs b/src/event_graph/proto.rs
index 29a786776..3d1eba06e 100644
--- a/src/event_graph/proto.rs
+++ b/src/event_graph/proto.rs
@@ -25,8 +25,8 @@ use std::{
};
use darkfi_serial::{async_trait, SerialDecodable, SerialEncodable};
-use log::{debug, error, trace, warn};
use smol::Executor;
+use tracing::{debug, error, trace, warn};
use super::{Event, EventGraphPtr, NULL_ID};
use crate::{
diff --git a/src/event_graph/tests.rs b/src/event_graph/tests.rs
index 45781df72..17e1211fe 100644
--- a/src/event_graph/tests.rs
+++ b/src/event_graph/tests.rs
@@ -20,10 +20,10 @@
use std::sync::Arc;
-use log::{info, warn};
use rand::{prelude::SliceRandom, rngs::ThreadRng};
use sled_overlay::sled;
use smol::{channel, future, Executor};
+use tracing::{info, warn};
use url::Url;
use crate::{
diff --git a/src/event_graph/util.rs b/src/event_graph/util.rs
index ee9309daf..721645235 100644
--- a/src/event_graph/util.rs
+++ b/src/event_graph/util.rs
@@ -25,9 +25,9 @@ use std::{
};
use darkfi_serial::{deserialize, deserialize_async, serialize};
-use log::error;
use sled_overlay::sled;
use tinyjson::JsonValue;
+use tracing::error;
use crate::{
event_graph::{Event, GENESIS_CONTENTS, INITIAL_GENESIS, NULL_ID, N_EVENT_PARENTS},
diff --git a/src/geode/mod.rs b/src/geode/mod.rs
index 603662c03..8ed1f97dc 100644
--- a/src/geode/mod.rs
+++ b/src/geode/mod.rs
@@ -82,7 +82,6 @@ use std::{
};
use futures::{AsyncRead, AsyncSeek};
-use log::{debug, info, warn};
use smol::{
fs::{self, File},
io::{
@@ -91,6 +90,7 @@ use smol::{
},
stream::StreamExt,
};
+use tracing::{debug, info, warn};
use crate::{Error, Result};
diff --git a/src/net/acceptor.rs b/src/net/acceptor.rs
index e50e96942..0e5096b31 100644
--- a/src/net/acceptor.rs
+++ b/src/net/acceptor.rs
@@ -24,8 +24,8 @@ use std::{
},
};
-use log::{error, info, warn};
use smol::Executor;
+use tracing::{error, info, warn};
use url::Url;
use super::{
diff --git a/src/net/channel.rs b/src/net/channel.rs
index 64315beba..5a723321e 100644
--- a/src/net/channel.rs
+++ b/src/net/channel.rs
@@ -29,13 +29,13 @@ use std::{
use darkfi_serial::{
async_trait, AsyncDecodable, AsyncEncodable, SerialDecodable, SerialEncodable, VarInt,
};
-use log::{debug, error, info, trace, warn};
use rand::{rngs::OsRng, Rng};
use smol::{
io::{self, AsyncRead, AsyncReadExt, AsyncWriteExt, ReadHalf, WriteHalf},
lock::{Mutex as AsyncMutex, OnceCell},
Executor,
};
+use tracing::{debug, error, info, trace, warn};
use url::Url;
use super::{
diff --git a/src/net/connector.rs b/src/net/connector.rs
index 31111f50d..d3400cf68 100644
--- a/src/net/connector.rs
+++ b/src/net/connector.rs
@@ -25,8 +25,8 @@ use futures::{
future::{select, Either},
pin_mut,
};
-use log::warn;
use smol::lock::RwLock as AsyncRwLock;
+use tracing::warn;
use url::Url;
use super::{
diff --git a/src/net/hosts.rs b/src/net/hosts.rs
index 34b5e332d..cfe8f1258 100644
--- a/src/net/hosts.rs
+++ b/src/net/hosts.rs
@@ -16,7 +16,6 @@
* along with this program. If not, see .
*/
-use log::{debug, error, info, trace, warn};
use rand::{prelude::IteratorRandom, rngs::OsRng, Rng};
use smol::lock::RwLock as AsyncRwLock;
use std::{
@@ -30,6 +29,7 @@ use std::{
},
time::{Instant, UNIX_EPOCH},
};
+use tracing::{debug, error, info, trace, warn};
use url::{Host, Url};
use super::{
diff --git a/src/net/message_publisher.rs b/src/net/message_publisher.rs
index 8049e7f15..7783109fd 100644
--- a/src/net/message_publisher.rs
+++ b/src/net/message_publisher.rs
@@ -20,9 +20,9 @@ use std::{any::Any, collections::HashMap, sync::Arc, time::Duration};
use async_trait::async_trait;
use futures::stream::{FuturesUnordered, StreamExt};
-use log::{debug, error};
use rand::{rngs::OsRng, Rng};
use smol::{io::AsyncReadExt, lock::Mutex};
+use tracing::{debug, error};
use super::message::Message;
use crate::{
diff --git a/src/net/metering.rs b/src/net/metering.rs
index 4b0bfb753..26bc56c76 100644
--- a/src/net/metering.rs
+++ b/src/net/metering.rs
@@ -18,7 +18,7 @@
use std::collections::VecDeque;
-use log::debug;
+use tracing::debug;
use crate::util::time::NanoTimestamp;
diff --git a/src/net/p2p.rs b/src/net/p2p.rs
index a6b248e4e..4af9091aa 100644
--- a/src/net/p2p.rs
+++ b/src/net/p2p.rs
@@ -23,8 +23,8 @@ use std::sync::{
use futures::{stream::FuturesUnordered, TryFutureExt};
use futures_rustls::rustls::crypto::{ring, CryptoProvider};
-use log::{debug, error, info, warn};
use smol::{fs, lock::RwLock as AsyncRwLock, stream::StreamExt};
+use tracing::{debug, error, info, warn};
use url::Url;
use super::{
diff --git a/src/net/protocol/protocol_address.rs b/src/net/protocol/protocol_address.rs
index 52d69d900..1e53b941e 100644
--- a/src/net/protocol/protocol_address.rs
+++ b/src/net/protocol/protocol_address.rs
@@ -17,9 +17,9 @@
*/
use async_trait::async_trait;
-use log::debug;
use smol::{lock::RwLock as AsyncRwLock, Executor};
use std::{sync::Arc, time::UNIX_EPOCH};
+use tracing::debug;
use super::{
super::{
diff --git a/src/net/protocol/protocol_generic.rs b/src/net/protocol/protocol_generic.rs
index df7346407..d614304b4 100644
--- a/src/net/protocol/protocol_generic.rs
+++ b/src/net/protocol/protocol_generic.rs
@@ -19,12 +19,12 @@
use std::{clone::Clone, collections::HashMap, fmt::Debug, sync::Arc};
use async_trait::async_trait;
-use log::debug;
use smol::{
channel::{Receiver, Sender},
lock::RwLock,
Executor,
};
+use tracing::debug;
use super::{
super::{
diff --git a/src/net/protocol/protocol_jobs_manager.rs b/src/net/protocol/protocol_jobs_manager.rs
index 84480b337..b7bffb3cd 100644
--- a/src/net/protocol/protocol_jobs_manager.rs
+++ b/src/net/protocol/protocol_jobs_manager.rs
@@ -18,8 +18,8 @@
use std::sync::Arc;
-use log::{debug, trace};
use smol::{future::Future, lock::Mutex, Executor, Task};
+use tracing::{debug, trace};
use super::super::channel::ChannelPtr;
use crate::Result;
diff --git a/src/net/protocol/protocol_ping.rs b/src/net/protocol/protocol_ping.rs
index 11024968c..8c68023cf 100644
--- a/src/net/protocol/protocol_ping.rs
+++ b/src/net/protocol/protocol_ping.rs
@@ -22,9 +22,9 @@ use std::{
};
use async_trait::async_trait;
-use log::{debug, error, warn};
use rand::{rngs::OsRng, Rng};
use smol::{lock::RwLock as AsyncRwLock, Executor};
+use tracing::{debug, error, warn};
use super::{
super::{
diff --git a/src/net/protocol/protocol_registry.rs b/src/net/protocol/protocol_registry.rs
index 2fc7ad3dd..a9cadbeec 100644
--- a/src/net/protocol/protocol_registry.rs
+++ b/src/net/protocol/protocol_registry.rs
@@ -16,11 +16,11 @@
* along with this program. If not, see .
*/
-use log::debug;
use smol::{
future::{Boxed, Future},
lock::Mutex,
};
+use tracing::debug;
use super::{
super::{channel::ChannelPtr, p2p::P2pPtr, session::SessionBitFlag},
diff --git a/src/net/protocol/protocol_seed.rs b/src/net/protocol/protocol_seed.rs
index 24f6d8f8f..743eb9920 100644
--- a/src/net/protocol/protocol_seed.rs
+++ b/src/net/protocol/protocol_seed.rs
@@ -17,9 +17,9 @@
*/
use async_trait::async_trait;
-use log::debug;
use smol::{lock::RwLock as AsyncRwLock, Executor};
use std::{sync::Arc, time::UNIX_EPOCH};
+use tracing::debug;
use super::{
super::{
diff --git a/src/net/protocol/protocol_version.rs b/src/net/protocol/protocol_version.rs
index fd14c1e91..9c7304908 100644
--- a/src/net/protocol/protocol_version.rs
+++ b/src/net/protocol/protocol_version.rs
@@ -20,12 +20,12 @@ use futures::{
future::{join_all, select, Either},
pin_mut,
};
-use log::{debug, error};
use smol::{lock::RwLock as AsyncRwLock, Executor, Timer};
use std::{
sync::Arc,
time::{Duration, UNIX_EPOCH},
};
+use tracing::{debug, error};
use super::super::{
channel::ChannelPtr,
diff --git a/src/net/session/direct_session.rs b/src/net/session/direct_session.rs
index 2270fc48c..064ee5a36 100644
--- a/src/net/session/direct_session.rs
+++ b/src/net/session/direct_session.rs
@@ -36,8 +36,8 @@ use std::{
};
use async_trait::async_trait;
-use log::{debug, error, info, warn};
use smol::lock::Mutex as AsyncMutex;
+use tracing::{debug, error, info, warn};
use url::Url;
use super::{
diff --git a/src/net/session/inbound_session.rs b/src/net/session/inbound_session.rs
index 9bc2b6f15..29f10c86a 100644
--- a/src/net/session/inbound_session.rs
+++ b/src/net/session/inbound_session.rs
@@ -26,8 +26,8 @@
use std::sync::{Arc, Weak};
use async_trait::async_trait;
-use log::{debug, error, info, warn};
use smol::{lock::Mutex, Executor};
+use tracing::{debug, error, info, warn};
use url::Url;
use super::{
diff --git a/src/net/session/manual_session.rs b/src/net/session/manual_session.rs
index 81b695c46..135690ef0 100644
--- a/src/net/session/manual_session.rs
+++ b/src/net/session/manual_session.rs
@@ -35,8 +35,8 @@ use std::sync::{Arc, Weak};
use async_trait::async_trait;
use futures::stream::{FuturesUnordered, StreamExt};
-use log::{debug, error, info, warn};
use smol::lock::{Mutex as AsyncMutex, RwLock as AsyncRwLock};
+use tracing::{debug, error, info, warn};
use url::Url;
use super::{
diff --git a/src/net/session/mod.rs b/src/net/session/mod.rs
index 9bdaf3f91..40761a144 100644
--- a/src/net/session/mod.rs
+++ b/src/net/session/mod.rs
@@ -22,8 +22,8 @@ use std::{
};
use async_trait::async_trait;
-use log::{debug, error, trace};
use smol::Executor;
+use tracing::{debug, error, trace};
use super::{
channel::ChannelPtr,
diff --git a/src/net/session/outbound_session.rs b/src/net/session/outbound_session.rs
index 1897b8a91..0f74137db 100644
--- a/src/net/session/outbound_session.rs
+++ b/src/net/session/outbound_session.rs
@@ -36,8 +36,8 @@ use std::{
use async_trait::async_trait;
use futures::stream::{FuturesUnordered, StreamExt};
-use log::{debug, error, info, warn};
use smol::lock::Mutex;
+use tracing::{debug, error, info, warn};
use url::Url;
use super::{
diff --git a/src/net/session/refine_session.rs b/src/net/session/refine_session.rs
index 8cf04e9c9..9bec100ab 100644
--- a/src/net/session/refine_session.rs
+++ b/src/net/session/refine_session.rs
@@ -36,7 +36,7 @@ use std::{
};
use async_trait::async_trait;
-use log::{debug, warn};
+use tracing::{debug, warn};
use url::Url;
use super::super::p2p::{P2p, P2pPtr};
diff --git a/src/net/session/seedsync_session.rs b/src/net/session/seedsync_session.rs
index d6b56fe27..873389de2 100644
--- a/src/net/session/seedsync_session.rs
+++ b/src/net/session/seedsync_session.rs
@@ -50,8 +50,8 @@ use std::sync::{
use async_trait::async_trait;
use futures::stream::{FuturesUnordered, StreamExt};
-use log::{debug, info, warn};
use smol::lock::{Mutex as AsyncMutex, RwLock as AsyncRwLock};
+use tracing::{debug, info, warn};
use url::Url;
use super::{
diff --git a/src/net/tests.rs b/src/net/tests.rs
index fcf809879..956c75a5e 100644
--- a/src/net/tests.rs
+++ b/src/net/tests.rs
@@ -21,9 +21,9 @@
use std::{collections::HashSet, net::TcpListener, panic, sync::Arc};
use darkfi_serial::{async_trait, SerialDecodable, SerialEncodable};
-use log::{error, info, warn};
use rand::{prelude::SliceRandom, rngs::ThreadRng, Rng};
use smol::{channel, future, Executor};
+use tracing::{error, info, warn};
use url::Url;
use crate::{
diff --git a/src/net/transport/mod.rs b/src/net/transport/mod.rs
index d8189c59d..2bb1b654f 100644
--- a/src/net/transport/mod.rs
+++ b/src/net/transport/mod.rs
@@ -19,8 +19,8 @@
use std::{io, time::Duration};
use async_trait::async_trait;
-use log::error;
use smol::io::{AsyncRead, AsyncWrite};
+use tracing::error;
use url::Url;
#[cfg(feature = "p2p-unix")]
diff --git a/src/net/transport/socks5.rs b/src/net/transport/socks5.rs
index c4e4211a4..d52a97e6e 100644
--- a/src/net/transport/socks5.rs
+++ b/src/net/transport/socks5.rs
@@ -23,8 +23,8 @@ use std::{
};
use futures::{AsyncReadExt, AsyncWriteExt};
-use log::debug;
use smol::net::TcpStream;
+use tracing::debug;
use url::Url;
/// SOCKS5 dialer
diff --git a/src/net/transport/tcp.rs b/src/net/transport/tcp.rs
index 2b376051d..85163fd7d 100644
--- a/src/net/transport/tcp.rs
+++ b/src/net/transport/tcp.rs
@@ -24,13 +24,13 @@ use futures::{
pin_mut,
};
use futures_rustls::{TlsAcceptor, TlsStream};
-use log::debug;
use smol::{
lock::OnceCell,
net::{SocketAddr, TcpListener as SmolTcpListener, TcpStream},
Async, Timer,
};
use socket2::{Domain, Socket, TcpKeepalive, Type};
+use tracing::debug;
use url::Url;
use super::{PtListener, PtStream};
diff --git a/src/net/transport/tls.rs b/src/net/transport/tls.rs
index 01b1f46b0..adc3572c1 100644
--- a/src/net/transport/tls.rs
+++ b/src/net/transport/tls.rs
@@ -29,8 +29,8 @@ use futures_rustls::{
},
TlsAcceptor, TlsConnector, TlsStream,
};
-use log::error;
use rustls_pemfile::pkcs8_private_keys;
+use tracing::error;
use x509_parser::{
parse_x509_certificate,
prelude::{GeneralName, ParsedExtension, X509Certificate},
diff --git a/src/net/transport/tor.rs b/src/net/transport/tor.rs
index 3924afbc2..ad6a496e8 100644
--- a/src/net/transport/tor.rs
+++ b/src/net/transport/tor.rs
@@ -36,7 +36,6 @@ use futures::{
stream::StreamExt,
Stream,
};
-use log::{debug, error, info, warn};
use smol::{
lock::{Mutex as AsyncMutex, OnceCell},
Timer,
@@ -46,6 +45,7 @@ use tor_error::ErrorReport;
use tor_hsservice::{HsNickname, RendRequest, RunningOnionService};
use tor_proto::stream::IncomingStreamRequest;
use tor_rtcompat::PreferredRuntime;
+use tracing::{debug, error, info, warn};
use url::Url;
use super::{PtListener, PtStream};
diff --git a/src/net/transport/unix.rs b/src/net/transport/unix.rs
index fa9d0e9ee..f6a6cb2d9 100644
--- a/src/net/transport/unix.rs
+++ b/src/net/transport/unix.rs
@@ -22,11 +22,11 @@ use std::{
};
use async_trait::async_trait;
-use log::debug;
use smol::{
fs,
net::unix::{UnixListener as SmolUnixListener, UnixStream},
};
+use tracing::debug;
use url::Url;
use super::{PtListener, PtStream};
diff --git a/src/rpc/client.rs b/src/rpc/client.rs
index 4ba917e1b..102373ea2 100644
--- a/src/rpc/client.rs
+++ b/src/rpc/client.rs
@@ -18,9 +18,9 @@
use std::sync::Arc;
-use log::{debug, error};
use smol::{channel, io::BufReader, Executor};
use tinyjson::JsonValue;
+use tracing::{debug, error};
use url::Url;
use super::{
diff --git a/src/rpc/clock_sync.rs b/src/rpc/clock_sync.rs
index d19adafea..ddabb97e6 100644
--- a/src/rpc/clock_sync.rs
+++ b/src/rpc/clock_sync.rs
@@ -19,7 +19,7 @@
//! Clock sync module
use std::{net::UdpSocket, time::Duration};
-use log::debug;
+use tracing::debug;
use url::Url;
use crate::{util::time::Timestamp, Error, Result};
diff --git a/src/rpc/common.rs b/src/rpc/common.rs
index 23431305e..7ca846b29 100644
--- a/src/rpc/common.rs
+++ b/src/rpc/common.rs
@@ -18,8 +18,8 @@
use std::{io, time::Duration};
-use log::error;
use smol::io::{AsyncReadExt, AsyncWriteExt, BufReader, ReadHalf, WriteHalf};
+use tracing::error;
use super::jsonrpc::*;
use crate::net::transport::PtStream;
diff --git a/src/rpc/server.rs b/src/rpc/server.rs
index ac8a455b8..527ec54b9 100644
--- a/src/rpc/server.rs
+++ b/src/rpc/server.rs
@@ -19,12 +19,12 @@
use std::{collections::HashSet, io::ErrorKind, sync::Arc};
use async_trait::async_trait;
-use log::{debug, error, info};
use smol::{
io::{BufReader, ReadHalf, WriteHalf},
lock::{Mutex, MutexGuard},
};
use tinyjson::JsonValue;
+use tracing::{debug, error, info};
use url::Url;
use super::{
diff --git a/src/runtime/import/db.rs b/src/runtime/import/db.rs
index 016f816fb..9120b3934 100644
--- a/src/runtime/import/db.rs
+++ b/src/runtime/import/db.rs
@@ -23,7 +23,7 @@ use darkfi_sdk::{
wasm,
};
use darkfi_serial::{deserialize, serialize, Decodable};
-use log::{debug, error, info};
+use tracing::{debug, error, info};
use wasmer::{FunctionEnvMut, WasmPtr};
use super::acl::acl_allow;
diff --git a/src/runtime/import/merkle.rs b/src/runtime/import/merkle.rs
index 9c04a6554..5514da33f 100644
--- a/src/runtime/import/merkle.rs
+++ b/src/runtime/import/merkle.rs
@@ -24,7 +24,7 @@ use darkfi_sdk::{
wasm,
};
use darkfi_serial::{serialize, Decodable, Encodable, WriteExt};
-use log::{debug, error};
+use tracing::{debug, error};
use wasmer::{FunctionEnvMut, WasmPtr};
use super::acl::acl_allow;
diff --git a/src/runtime/import/smt.rs b/src/runtime/import/smt.rs
index 70a007e12..deca4e0b7 100644
--- a/src/runtime/import/smt.rs
+++ b/src/runtime/import/smt.rs
@@ -28,8 +28,8 @@ use darkfi_sdk::{
};
use darkfi_serial::{deserialize, serialize, Decodable, Encodable};
use halo2_proofs::pasta::pallas;
-use log::{debug, error};
use num_bigint::BigUint;
+use tracing::{debug, error};
use wasmer::{FunctionEnvMut, WasmPtr};
use super::acl::acl_allow;
diff --git a/src/runtime/import/util.rs b/src/runtime/import/util.rs
index 55ce9fd01..a9ed03d8e 100644
--- a/src/runtime/import/util.rs
+++ b/src/runtime/import/util.rs
@@ -20,7 +20,7 @@ use std::io::Cursor;
use darkfi_sdk::wasm;
use darkfi_serial::Decodable;
-use log::{debug, error};
+use tracing::{debug, error};
use wasmer::{FunctionEnvMut, WasmPtr};
use super::acl::acl_allow;
diff --git a/src/runtime/vm_runtime.rs b/src/runtime/vm_runtime.rs
index 10d7880fc..831306ef7 100644
--- a/src/runtime/vm_runtime.rs
+++ b/src/runtime/vm_runtime.rs
@@ -27,7 +27,7 @@ use darkfi_sdk::{
wasm, AsHex,
};
use darkfi_serial::serialize;
-use log::{debug, error, info};
+use tracing::{debug, error, info};
use wasmer::{
imports, sys::CompilerConfig, wasmparser::Operator, AsStoreMut, AsStoreRef, Function,
FunctionEnv, Instance, Memory, MemoryView, Module, Pages, Store, Value, WASM_PAGE_SIZE,
diff --git a/src/system/publisher.rs b/src/system/publisher.rs
index da16f1c9e..993d49a33 100644
--- a/src/system/publisher.rs
+++ b/src/system/publisher.rs
@@ -18,9 +18,9 @@
use std::{collections::HashMap, sync::Arc};
-use log::warn;
use rand::{rngs::OsRng, Rng};
use smol::lock::Mutex;
+use tracing::warn;
pub type PublisherPtr = Arc>;
pub type SubscriptionId = usize;
diff --git a/src/system/stoppable_task.rs b/src/system/stoppable_task.rs
index dcf9edea5..e2480efff 100644
--- a/src/system/stoppable_task.rs
+++ b/src/system/stoppable_task.rs
@@ -16,13 +16,13 @@
* along with this program. If not, see .
*/
-use log::trace;
use rand::{rngs::OsRng, Rng};
use smol::{
future::{self, Future},
Executor,
};
use std::sync::Arc;
+use tracing::trace;
use super::CondVar;
@@ -155,8 +155,7 @@ impl Drop for StoppableTask {
mod tests {
use super::*;
use crate::{error::Error, system::sleep_forever};
- use log::warn;
-
+ use tracing::warn;
#[test]
fn stoppit_mom() {
let mut cfg = simplelog::ConfigBuilder::new();
diff --git a/src/tx/mod.rs b/src/tx/mod.rs
index 21b4884d8..ec15f320c 100644
--- a/src/tx/mod.rs
+++ b/src/tx/mod.rs
@@ -33,7 +33,7 @@ use darkfi_sdk::{
use darkfi_serial::async_trait;
use darkfi_serial::{Encodable, SerialDecodable, SerialEncodable};
-use log::{debug, error};
+use tracing::{debug, error};
use crate::{
error::TxVerifyFailed,
diff --git a/src/validator/consensus.rs b/src/validator/consensus.rs
index fa345830e..44a926ef8 100644
--- a/src/validator/consensus.rs
+++ b/src/validator/consensus.rs
@@ -20,10 +20,10 @@ use std::collections::{HashMap, HashSet};
use darkfi_sdk::{crypto::MerkleTree, monotree::Monotree, tx::TransactionHash};
use darkfi_serial::{async_trait, SerialDecodable, SerialEncodable};
-use log::{debug, info, warn};
use num_bigint::BigUint;
use sled_overlay::database::SledDbOverlayStateDiff;
use smol::lock::RwLock;
+use tracing::{debug, info, warn};
use crate::{
blockchain::{
diff --git a/src/validator/mod.rs b/src/validator/mod.rs
index b5af72dfb..3b5d4ac56 100644
--- a/src/validator/mod.rs
+++ b/src/validator/mod.rs
@@ -19,10 +19,10 @@
use std::{collections::HashMap, sync::Arc};
use darkfi_sdk::crypto::MerkleTree;
-use log::{debug, error, info, warn};
use num_bigint::BigUint;
use sled_overlay::sled;
use smol::lock::RwLock;
+use tracing::{debug, error, info, warn};
use crate::{
blockchain::{
diff --git a/src/validator/pow.rs b/src/validator/pow.rs
index 2e3cf4c89..a3fb0011b 100644
--- a/src/validator/pow.rs
+++ b/src/validator/pow.rs
@@ -26,10 +26,10 @@ use std::{
};
use darkfi_sdk::num_traits::{One, Zero};
-use log::debug;
use num_bigint::BigUint;
use randomx::{RandomXCache, RandomXDataset, RandomXFlags, RandomXVM};
use smol::channel::Receiver;
+use tracing::debug;
use crate::{
blockchain::{
diff --git a/src/validator/utils.rs b/src/validator/utils.rs
index b2921a5f4..98ad855cb 100644
--- a/src/validator/utils.rs
+++ b/src/validator/utils.rs
@@ -20,9 +20,9 @@ use darkfi_sdk::{
crypto::{DAO_CONTRACT_ID, DEPLOYOOOR_CONTRACT_ID, MONEY_CONTRACT_ID},
tx::TransactionHash,
};
-use log::info;
use num_bigint::BigUint;
use randomx::{RandomXCache, RandomXFlags, RandomXVM};
+use tracing::info;
use crate::{
blockchain::{BlockInfo, BlockchainOverlayPtr, Header},
diff --git a/src/validator/verification.rs b/src/validator/verification.rs
index f64e2e8f2..d157a6da3 100644
--- a/src/validator/verification.rs
+++ b/src/validator/verification.rs
@@ -30,9 +30,9 @@ use darkfi_sdk::{
pasta::pallas,
};
use darkfi_serial::{deserialize_async, serialize_async, AsyncDecodable, AsyncEncodable};
-use log::{debug, error, warn};
use num_bigint::BigUint;
use smol::io::Cursor;
+use tracing::{debug, error, warn};
use crate::{
blockchain::{
diff --git a/src/zk/debug.rs b/src/zk/debug.rs
index 4c47cd15b..d521888aa 100644
--- a/src/zk/debug.rs
+++ b/src/zk/debug.rs
@@ -32,7 +32,7 @@ use {
};
use darkfi_sdk::pasta::pallas;
-use log::error;
+use tracing::error;
use super::{Witness, ZkCircuit};
use crate::{zkas, Error, Result};
diff --git a/src/zk/vm.rs b/src/zk/vm.rs
index 5382678f8..afde0f95f 100644
--- a/src/zk/vm.rs
+++ b/src/zk/vm.rs
@@ -53,7 +53,7 @@ use halo2_proofs::{
plonk,
plonk::{Advice, Circuit, Column, ConstraintSystem, Instance as InstanceColumn},
};
-use log::{error, trace};
+use tracing::{error, trace};
pub use super::vm_heap::{HeapVar, Witness};
use super::{
diff --git a/src/zk/vm_heap.rs b/src/zk/vm_heap.rs
index ea60d79cc..c7733c1e9 100644
--- a/src/zk/vm_heap.rs
+++ b/src/zk/vm_heap.rs
@@ -31,7 +31,7 @@ use halo2_proofs::{
pasta::pallas,
plonk,
};
-use log::error;
+use tracing::error;
use crate::{
zkas::{decoder::ZkBinary, types::VarType},