feat: persist diagnostic logs with daily rotation and retention

This commit is contained in:
Ed1s0nZ
2026-09-08 14:41:46 +08:00
parent 6ad9ea2d13
commit 94cdf760af
10 changed files with 255 additions and 6 deletions
+3
View File
@@ -36,6 +36,9 @@ auth:
log:
level: info # 日志级别: debug(调试), info(信息), warn(警告), error(错误)
output: stdout # 日志输出位置: stdout(标准输出), stderr(标准错误), 或文件路径
diagnostic_dir: log # 额外保存 warn 及以上诊断日志,按本地日期拆分;相对于进程工作目录
diagnostic_retention_days: 14 # 保留天数(含当天);省略或 <= 0 使用 14 天
diagnostic_disabled: false # true 关闭额外诊断日志;修改后需重启
# 平台操作审计(系统设置 -> 日志审计;不记录对话正文与每次工具调用)
audit:
enabled: true