修改日志保存路径
This commit is contained in:
@@ -20,7 +20,9 @@ def get_logger(name: str, log_filename: str) -> logging.Logger:
|
||||
if logger.handlers:
|
||||
return logger
|
||||
|
||||
LOG_DIR = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "logs")
|
||||
LOG_DIR = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "log")
|
||||
if name:
|
||||
LOG_DIR = os.path.join(LOG_DIR, name)
|
||||
os.makedirs(LOG_DIR, exist_ok=True)
|
||||
|
||||
class DailyRotatingFileHandler(logging.FileHandler):
|
||||
|
||||
Reference in New Issue
Block a user