diff --git a/src/config.rs b/src/config.rs index 481d6be..f3134e7 100644 --- a/src/config.rs +++ b/src/config.rs @@ -10,7 +10,7 @@ pub struct Config {} impl Config { pub fn load(path: &Path) -> anyhow::Result { - info!("Loading config from {}", path.display()); + info!(path = %path.display(), "Loading config"); Ok(match fs::read_to_string(path) { Ok(str) => toml::from_str(&str)?, Err(e) if e.kind() == ErrorKind::NotFound => { diff --git a/src/main.rs b/src/main.rs index e859aa7..2cc5795 100644 --- a/src/main.rs +++ b/src/main.rs @@ -38,7 +38,8 @@ struct Args { fn set_up_logging(verbose: bool) { if verbose { tracing_subscriber::fmt() - .with_max_level(LevelFilter::DEBUG) + .with_max_level(LevelFilter::TRACE) + .pretty() .init(); } else { tracing_subscriber::fmt() diff --git a/src/state.rs b/src/state.rs index 3a03534..d3ad94b 100644 --- a/src/state.rs +++ b/src/state.rs @@ -29,7 +29,7 @@ async fn open_db(db_path: &Path) -> sqlx::Result { .create_if_missing(true) .optimize_on_close(true, None); - info!("Opening db at {}", db_path.display()); + info!(path = %db_path.display(), "Opening db"); let pool = SqlitePoolOptions::new().connect_with(options).await?; debug!("Applying outstanding db migrations"); @@ -39,7 +39,7 @@ async fn open_db(db_path: &Path) -> sqlx::Result { } fn open_repo(repo_path: &Path) -> anyhow::Result { - info!("Opening repo at {}", repo_path.display()); + info!(path = %repo_path.display(), "Opening repo"); Ok(ThreadSafeRepository::open(repo_path)?) }