Fix SSE route dependency and align architecture docs

This commit is contained in:
ash66
2026-05-18 16:32:42 +08:00
parent 86b9ac806a
commit 3f69cad404
149 changed files with 4786 additions and 5957 deletions

View File

@@ -1,16 +1,18 @@
"""日志配置"""
"""Configure backend settings for logging."""
from loguru import logger
import sys
# Keep configuration setup explicit so runtime behavior is easy to reason about.
def setup_logging(level: str = "INFO"):
"""设置日志配置"""
"""Handle setup logging."""
# 移除默认handler
# Keep configuration setup explicit so runtime behavior is easy to reason about.
logger.remove()
# 添加控制台输出
# Keep configuration setup explicit so runtime behavior is easy to reason about.
logger.add(
sys.stdout,
level=level,
@@ -18,7 +20,7 @@ def setup_logging(level: str = "INFO"):
colorize=True
)
# 添加文件输出
# Keep configuration setup explicit so runtime behavior is easy to reason about.
logger.add(
"logs/app_{time:YYYY-MM-DD}.log",
level=level,