From 0353cdadfef569138b3ec84885cffb6f0cabcc43 Mon Sep 17 00:00:00 2001 From: Ricardo-binZzz <285964759+Ricardo-binZzz@users.noreply.github.com> Date: Wed, 29 Jul 2026 02:42:52 +0800 Subject: [PATCH] fix(logging): record cleanup success at info level --- backend/internal/service/ops_cleanup_service.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/internal/service/ops_cleanup_service.go b/backend/internal/service/ops_cleanup_service.go index cfd2f1eedc..38e94fb17a 100644 --- a/backend/internal/service/ops_cleanup_service.go +++ b/backend/internal/service/ops_cleanup_service.go @@ -15,6 +15,7 @@ import ( "github.com/google/uuid" "github.com/redis/go-redis/v9" "github.com/robfig/cron/v3" + "go.uber.org/zap" ) const ( @@ -285,7 +286,10 @@ func (s *OpsCleanupService) runScheduled() { return } s.recordHeartbeatSuccess(runAt, time.Since(startedAt), counts) - logger.LegacyPrintf("service.ops_cleanup", "[OpsCleanup] cleanup complete: %s", counts) + logger.L().Info("[OpsCleanup] cleanup complete", + zap.String("component", "service.ops_cleanup"), + zap.String("deleted_counts", counts.String()), + ) } func (s *OpsCleanupService) runCleanupOnce(ctx context.Context) (opsCleanupDeletedCounts, error) {