feat: 添加系统日志功能,记录运行时错误和AI调用失败,提供日志查看页面

This commit is contained in:
2026-03-14 00:32:20 +08:00
parent d2d63d5e61
commit dc7efb8ff8
10 changed files with 208 additions and 2 deletions

View File

@@ -124,6 +124,16 @@ $env:SILICONFLOW_MODEL="Qwen/Qwen2.5-7B-Instruct"
- 页面:`/ai/settings`
- 保存文件:`data/ai_settings.json`
### 2.6 系统日志
为便于定位 AI 请求失败、配置错误、未处理异常,系统提供日志查看页面:
- 页面入口:右上角 `账号` -> `系统日志`
- 快速入口:`仓库概览` 页面 AI 补货建议卡片中的 `日志`
- 日志文件:`data/app.log`
当 AI 补货建议出现“请求失败,请稍后重试”时,优先打开系统日志查看最近的 `ERROR``WARNING` 记录。
## 3. 页面说明
### 3.1 首页 `/`