makedir
This commit is contained in:
parent
b42aa28922
commit
401009bc9c
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user