This commit is contained in:
QiyiJiang 2024-07-14 08:52:30 +00:00
parent b42aa28922
commit 401009bc9c

View File

@ -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)