chore: add logging

feat/type-attributes
Tomáš Mládek 2022-09-19 22:21:15 +02:00
parent ac0b4d4a9d
commit f1315ae7c4
1 changed files with 4 additions and 1 deletions

View File

@ -18,7 +18,7 @@ use chrono::prelude::*;
use diesel::r2d2::{self, ConnectionManager};
use diesel::ExpressionMethods;
use diesel::{Connection, QueryDsl, RunQueryDsl, SqliteConnection};
use log::{debug, error, info, warn};
use log::{debug, error, info, warn, trace};
use lru::LruCache;
use rayon::prelude::*;
use serde_json::json;
@ -89,6 +89,7 @@ pub struct FsStore {
impl FsStore {
pub fn from_path<P: AsRef<Path>>(path: P) -> Result<FsStore> {
debug!("Initializing FS store.");
let path = path.as_ref().to_path_buf().canonicalize()?;
let store_dir = path.join(UPEND_SUBDIR);
if !store_dir.exists() {
@ -124,6 +125,7 @@ impl FsStore {
let lock = Arc::new(RwLock::new(()));
debug!("FS store created.");
Ok(FsStore { path, pool, lock })
}
@ -680,6 +682,7 @@ impl UpStore for FsStore {
mut job_container: JobContainer,
initial: bool,
) -> Result<Vec<UpdatePathOutcome>, StoreError> {
trace!("Running a vault update of {:?}, initial = {}.", self.path, initial);
let job_result = job_container.add_job("REIMPORT", "Scaning vault directory...");
match job_result {