From d0db6cba103839e0fdafd031a8333f6124e3e5b0 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Thu, 4 Mar 2021 16:52:29 +1100 Subject: [PATCH] Favour individual logs over one in main --- swap/src/bin/swap_cli.rs | 5 ----- swap/src/database.rs | 2 ++ swap/src/seed.rs | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/swap/src/bin/swap_cli.rs b/swap/src/bin/swap_cli.rs index 02275a54..dd9d88b7 100644 --- a/swap/src/bin/swap_cli.rs +++ b/swap/src/bin/swap_cli.rs @@ -76,11 +76,6 @@ async fn main() -> Result<()> { None => Config::testnet(), }; - debug!( - "Database and seed will be stored in {}", - config.data.dir.display() - ); - let db = Database::open(config.data.dir.join("database").as_path()) .context("Could not open database")?; diff --git a/swap/src/database.rs b/swap/src/database.rs index b591d2c1..e9389e47 100644 --- a/swap/src/database.rs +++ b/swap/src/database.rs @@ -51,6 +51,8 @@ pub struct Database(sled::Db); impl Database { pub fn open(path: &Path) -> Result { + tracing::debug!("Opening database at {}", path.display()); + let db = sled::open(path).with_context(|| format!("Could not open the DB at {:?}", path))?; diff --git a/swap/src/seed.rs b/swap/src/seed.rs index 03413475..397482eb 100644 --- a/swap/src/seed.rs +++ b/swap/src/seed.rs @@ -90,7 +90,7 @@ impl Seed { let contents = fs::read_to_string(file)?; let pem = pem::parse(contents)?; - tracing::trace!("Read in seed from {}", file.display()); + tracing::debug!("Reading in seed from {}", file.display()); Self::from_pem(pem) }