From 401009bc9c98beaeae42104576ea6995ed909ac5 Mon Sep 17 00:00:00 2001 From: QiyiJiang <3442721524@qq.com> Date: Sun, 14 Jul 2024 08:52:30 +0000 Subject: [PATCH] makedir --- src/utils/logging_config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/logging_config.py b/src/utils/logging_config.py index 99f49d9a..81f0d7f6 100644 --- a/src/utils/logging_config.py +++ b/src/utils/logging_config.py @@ -1,4 +1,5 @@ import logging +import os from datetime import datetime @@ -9,7 +10,7 @@ def setup_logger(name, log_file=None, level=logging.DEBUG, console=False): if log_file is None: log_file = f'output/log/project-{DATETIME}.log' - + os.makedirs("output/log", exist_ok=True) """Function to setup logger with the given name and log file.""" logger = logging.getLogger(name)