mirror of
https://github.com/insistence/RuoYi-Vue3-FastAPI.git
synced 2026-09-21 20:55:15 +00:00
feat: 初始化项目架构
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import os
|
||||
import time
|
||||
from loguru import logger
|
||||
|
||||
log_path = os.path.join(os.getcwd(), 'logs')
|
||||
if not os.path.exists(log_path):
|
||||
os.mkdir(log_path)
|
||||
|
||||
log_path_error = os.path.join(log_path, f'{time.strftime("%Y-%m-%d")}_error.log')
|
||||
|
||||
logger.add(log_path_error, rotation="50MB", encoding="utf-8", enqueue=True, compression="zip")
|
||||
Reference in New Issue
Block a user