mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-02-22 15:49:52 -05:00
CLI: Initiate tracing earlier to avoid lost logs (#1646)
This commit is contained in:
parent
0ca98cd0b7
commit
c433bd2389
@ -184,6 +184,10 @@ impl Context {
|
||||
let data_dir = data::data_dir_from(data, is_testnet)?;
|
||||
let env_config = env_config_from(is_testnet);
|
||||
|
||||
START.call_once(|| {
|
||||
let _ = cli::tracing::init(debug, json, data_dir.join("logs"));
|
||||
});
|
||||
|
||||
let seed = Seed::from_file_or_generate(data_dir.as_path())
|
||||
.context("Failed to read seed in file")?;
|
||||
|
||||
@ -219,10 +223,6 @@ impl Context {
|
||||
|
||||
let tor_socks5_port = tor.map_or(9050, |tor| tor.tor_socks5_port);
|
||||
|
||||
START.call_once(|| {
|
||||
let _ = cli::tracing::init(debug, json, data_dir.join("logs"));
|
||||
});
|
||||
|
||||
let context = Context {
|
||||
db: open_db(data_dir.join("sqlite")).await?,
|
||||
bitcoin_wallet,
|
||||
|
Loading…
x
Reference in New Issue
Block a user