Favour individual logs over one in main

This commit is contained in:
Thomas Eizinger 2021-03-04 16:52:29 +11:00
parent 2041f367c6
commit d0db6cba10
No known key found for this signature in database
GPG Key ID: 651AC83A6C6C8B96
3 changed files with 3 additions and 6 deletions

View File

@ -76,11 +76,6 @@ async fn main() -> Result<()> {
None => Config::testnet(), 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()) let db = Database::open(config.data.dir.join("database").as_path())
.context("Could not open database")?; .context("Could not open database")?;

View File

@ -51,6 +51,8 @@ pub struct Database(sled::Db);
impl Database { impl Database {
pub fn open(path: &Path) -> Result<Self> { pub fn open(path: &Path) -> Result<Self> {
tracing::debug!("Opening database at {}", path.display());
let db = let db =
sled::open(path).with_context(|| format!("Could not open the DB at {:?}", path))?; sled::open(path).with_context(|| format!("Could not open the DB at {:?}", path))?;

View File

@ -90,7 +90,7 @@ impl Seed {
let contents = fs::read_to_string(file)?; let contents = fs::read_to_string(file)?;
let pem = pem::parse(contents)?; 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) Self::from_pem(pem)
} }