CLI: Initiate tracing earlier to avoid lost logs (#1646)

pull/1571/head^2
binarybaron 3 weeks ago committed by GitHub
parent 0ca98cd0b7
commit c433bd2389
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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…
Cancel
Save