mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-15 16:48:58 -05:00
Use tracing-log feature flag instead of manual initialization
This also formats `log` events more nicely. Instead of ``` Mar 29 09:46:16.775 INFO log: Found message after comparing 82 lines log.target="testcontainers::core::wait_for_message" log.module_path="testcontainers::core::wait_for_message" log.file="/home/thomas/.cargo/registry/src/github.com-1ecc6299db9ec823/testcontainers-0.12.0/src/core/wait_for_message.rs" log.line=35 ``` We now have ``` Mar 29 09:57:15.860 INFO testcontainers::core::wait_for_message: Found message after comparing 81 lines ```
This commit is contained in:
parent
c5827f84ca
commit
c01cccb288
6 changed files with 3 additions and 22 deletions
|
|
@ -29,7 +29,6 @@ use tokio::sync::mpsc;
|
|||
use tokio::task::JoinHandle;
|
||||
use tokio::time::interval;
|
||||
use tracing::dispatcher::DefaultGuard;
|
||||
use tracing_log::LogTracer;
|
||||
use url::Url;
|
||||
use uuid::Uuid;
|
||||
|
||||
|
|
@ -666,11 +665,6 @@ struct Containers<'a> {
|
|||
/// let _guard = init_tracing();
|
||||
/// ```
|
||||
pub fn init_tracing() -> DefaultGuard {
|
||||
// converts all log records into tracing events
|
||||
// Note: Make sure to initialize without unwrapping, otherwise this causes
|
||||
// trouble when running multiple tests.
|
||||
let _ = LogTracer::init();
|
||||
|
||||
use tracing_subscriber::util::SubscriberInitExt as _;
|
||||
tracing_subscriber::fmt()
|
||||
.with_env_filter("warn,swap=debug,monero_harness=debug,monero_rpc=info,bitcoin_harness=info,testcontainers=info")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue