Use deffault logging level for PurgeOldTags()

This commit is contained in:
Roman Vynar 2020-07-10 15:42:44 +03:00
parent c022edba0f
commit 88964cb46e

View File

@ -5,7 +5,6 @@ import (
"sort" "sort"
"time" "time"
"github.com/sirupsen/logrus"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )
@ -35,9 +34,6 @@ func (p timeSlice) Swap(i, j int) {
// PurgeOldTags purge old tags. // PurgeOldTags purge old tags.
func PurgeOldTags(client *Client, purgeDryRun bool, purgeTagsKeepDays, purgeTagsKeepCount int) { func PurgeOldTags(client *Client, purgeDryRun bool, purgeTagsKeepDays, purgeTagsKeepCount int) {
logger := SetupLogging("registry.tasks.PurgeOldTags") logger := SetupLogging("registry.tasks.PurgeOldTags")
// Reduce client logging.
client.logger.Logger.SetLevel(logrus.ErrorLevel)
dryRunText := "" dryRunText := ""
if purgeDryRun { if purgeDryRun {
logger.Warn("Dry-run mode enabled.") logger.Warn("Dry-run mode enabled.")