diff --git a/src/jobflow_remote/utils/log.py b/src/jobflow_remote/utils/log.py index 81cd93f8..237e2c8d 100644 --- a/src/jobflow_remote/utils/log.py +++ b/src/jobflow_remote/utils/log.py @@ -6,6 +6,8 @@ import logging.config from pathlib import Path +from monty.os import makedirs_p + def initialize_runner_logger(log_folder: str | Path, level: int = logging.INFO): """Initialize the default logger. @@ -25,7 +27,10 @@ def initialize_runner_logger(log_folder: str | Path, level: int = logging.INFO): # TODO if the directory it is not present it does not initialize the logger with # an unclear error message. It may be worth leaving this: - # makedirs_p(log_folder) + + # @ml-evs: Indeed I found this necessary when testing the runner locally -- cryptic crashes + # if the log folder is not present, so I have retained it here. + makedirs_p(log_folder) config = { "version": 1,