Skip to content

Commit cf939d8

Browse files
committed
fix(logging): 修复 uvicorn.error 日志在文件中重复打印的问题;
为 uvicorn.error logger 显式配置 handlers 与 propagate=False, 阻断经父 logger uvicorn 二次传播至文件 handler 的路径。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
1 parent 34ae1ba commit cf939d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/coding/proxy/logging/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def build_log_config(
118118
},
119119
"loggers": {
120120
"uvicorn": {"handlers": ["default"], "level": level, "propagate": False},
121-
"uvicorn.error": {"level": level},
121+
"uvicorn.error": {"handlers": ["default"], "level": level, "propagate": False},
122122
"uvicorn.access": {
123123
"handlers": ["access"],
124124
"level": "INFO",

0 commit comments

Comments
 (0)