Skip to content

Commit

Permalink
Make log folder if missing, and add clarifying note
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed Oct 22, 2023
1 parent 633bd6e commit 9df23d1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/jobflow_remote/utils/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
Expand Down

0 comments on commit 9df23d1

Please sign in to comment.