Skip to content

Commit

Permalink
chore: change log level for log retention policies (#9935)
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinaecalderon authored Sep 16, 2024
1 parent b559467 commit 0928958
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions master/internal/logretention/logretention.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func DeleteExpiredTaskLogs(ctx context.Context, days *int16) (int64, error) {
if days != nil {
defaultLogRetentionDays = *days
}
log.WithField("default-retention-days", defaultLogRetentionDays).Trace("deleting expired task logs")
log.WithField("default-retention-days", defaultLogRetentionDays).Info("deleting expired task logs")
r, err := db.Bun().NewRaw(fmt.Sprintf(`
WITH log_retention_tasks AS (
SELECT COALESCE(r.log_retention_days, %d) as log_retention_days, t.task_id, t.end_time
Expand All @@ -112,6 +112,6 @@ func DeleteExpiredTaskLogs(ctx context.Context, days *int16) (int64, error) {
return 0, errors.Wrap(err, "error deleting expired task logs")
}
rows, err := r.RowsAffected()
log.WithFields(logrus.Fields{"rows": rows, "err": err}).Trace("deleted expired task logs")
log.WithFields(logrus.Fields{"rows": rows, "err": err}).Info("deleted expired task logs")
return rows, err
}

0 comments on commit 0928958

Please sign in to comment.