feat(common): configure file log level

Allow operators to control how much diagnostic information is retained in file logs independently from live console output.

Document the new startup setting and add regression coverage for its default behavior, runtime independence, and unsupported configurations.
This commit is contained in:
Werewolf-Wu authored and DrSmoothl committed 2026-07-30 10:04:52 +08:00
1 parent e5f256f4dc
commit 227a62f2ad
6 files changed
+236 -27

No files matched your search

+1
View File
@@ -101,6 +101,7 @@ WebUI 的“系统设置 → 存储管理”可查看受管数据占用、调整
| 日志树总量上限 | 1024 MB | `SNOWLUMA_LOG_MAX_TOTAL_MB` |
| 日志保留天数 | 7 天;`0` 表示关闭按日期清理 | `SNOWLUMA_LOG_RETAIN_DAYS` |
| 按账号额外写日志 | 关闭 | `SNOWLUMA_LOG_PER_UIN` |
| 文件日志级别 | debug | `SNOWLUMA_LOG_FILE_LEVEL` |
环境变量优先于 `config/runtime.json`,对应字段会在 WebUI 中显示为锁定。`SNOWLUMA_LOG_MAX_MB` 仅控制单个日志分卷大小,不是日志树总量上限。