create non-existent fragments log directory
@@ -70,6 +70,9 @@ impl Process {
fn open_log_file(dir: &Path) -> Result<File, Error> {
let mut path: PathBuf = dir.into();
+ if !path.exists() {
+ std::fs::create_dir(dir).map_err(Error::PersistentLog)?;
+ }
let log_file_name = Utc::now().format("%Y-%m-%d_%H.log").to_string();
path.push(log_file_name);
tracing::debug!("creating fragment log file `{:?}`", path);
