补齐三类日志的触发操作和结果并完善运行事件展示
Security Checks / security (push) Waiting to run

This commit is contained in:
xuans committed 2026-09-09 02:48:07 +08:00
1 parent b50e5bdfa2
commit dd6258c98b
34 files changed
+734 -87

No files matched your search

+2 -2
View File
@@ -23,7 +23,7 @@ func Record(ctx context.Context, entry Entry) {
bounded, cancel := context.WithTimeout(ctx, 5*time.Second)
defer cancel()
if err := store.Write(bounded, entry); err != nil {
log.WithError(err).Error("业务日志写入失败")
log.WithError(err).WithFields(log.Fields{"action": "写入业务日志", "object": entry.Kind, "result": "failure"}).Error("业务日志写入失败")
}
}
@@ -47,7 +47,7 @@ func Start(store *Store) *Runtime {
_, err := store.Cleanup(bounded, time.Now())
stop()
if err != nil && ctx.Err() == nil {
log.WithError(err).Error("过期业务日志清理失败,将在下一轮重试")
log.WithError(err).WithFields(log.Fields{"action": "清理过期业务日志", "result": "failure"}).Error("过期业务日志清理失败,将在下一轮重试")
}
select {
case <-ctx.Done():