mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-01-27 15:57:14 -05:00
Inline tracing configuration for swap_cli
This allows us to configure the presentation separately from the ASB.
This commit is contained in:
parent
a0e7c6ecf7
commit
b8df4a3145
@ -34,10 +34,9 @@ use swap::{
|
|||||||
bob::{cancel::CancelError, Builder},
|
bob::{cancel::CancelError, Builder},
|
||||||
},
|
},
|
||||||
seed::Seed,
|
seed::Seed,
|
||||||
trace::init_tracing,
|
|
||||||
};
|
};
|
||||||
use tracing::{debug, error, info, warn};
|
use tracing::{debug, error, info, warn, Level};
|
||||||
use tracing_subscriber::filter::LevelFilter;
|
use tracing_subscriber::FmtSubscriber;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
@ -47,7 +46,15 @@ const MONERO_BLOCKCHAIN_MONITORING_WALLET_NAME: &str = "swap-tool-blockchain-mon
|
|||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<()> {
|
async fn main() -> Result<()> {
|
||||||
init_tracing(LevelFilter::DEBUG).expect("initialize tracing");
|
let is_terminal = atty::is(atty::Stream::Stderr);
|
||||||
|
let subscriber = FmtSubscriber::builder()
|
||||||
|
.with_env_filter(format!("swap={}", Level::DEBUG))
|
||||||
|
.with_writer(std::io::stderr)
|
||||||
|
.with_ansi(is_terminal)
|
||||||
|
.with_target(false)
|
||||||
|
.finish();
|
||||||
|
|
||||||
|
tracing::subscriber::set_global_default(subscriber)?;
|
||||||
|
|
||||||
let opt = Arguments::from_args();
|
let opt = Arguments::from_args();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user