优化生产日志体积:访问降噪、压缩清理与退款告警节流

跳过轮询/封面等热路径成功请求,按日 gzip 并保留可配天数,退款 max-retry 汇总告警。
This commit is contained in:
yml2213
2026-07-13 22:02:20 +08:00
parent f51aed1f0f
commit 2efcede800
8 changed files with 361 additions and 41 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ func New(cfg config.LogConfig) (*zap.Logger, error) {
))
}
if cfg.EnableFile {
writer := newDailyWriter(cfg.Dir, "app", location)
writer := newDailyWriter(cfg.Dir, "app", location, cfg.RetainDays)
cores = append(cores, zapcore.NewCore(
zapcore.NewJSONEncoder(encoderConfig),
writer,