Fix SSE route dependency and align architecture docs
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user