关闭flask日志

This commit is contained in:
2025-11-07 14:31:07 +08:00
parent a9c9e39143
commit fa539aef73
7 changed files with 14 additions and 1 deletions

View File

@@ -194,6 +194,7 @@ class LogManager:
@classmethod
def clearLogs(cls):
print("清空日志")
"""启动时清空 log 目录下所有文件"""
# 先关闭所有 logger 的文件句柄
for _, logger in logging.Logger.manager.loggerDict.items():