Amend tag info page, change logging.

* Amend representation of the tag info page
* Change logging library, add "-log-level" argument and put most of the logging into DEBUG mode
This commit is contained in:
Roman Vynar
2020-02-18 23:31:56 +02:00
parent dc7b2e42fc
commit 67d82c7d59
11 changed files with 199 additions and 134 deletions

View File

@@ -5,7 +5,7 @@ import (
"sort"
"time"
"github.com/hhkbp2/go-logging"
"github.com/sirupsen/logrus"
"github.com/tidwall/gjson"
)
@@ -36,7 +36,7 @@ func (p timeSlice) Swap(i, j int) {
func PurgeOldTags(client *Client, purgeDryRun bool, purgeTagsKeepDays, purgeTagsKeepCount int) {
logger := SetupLogging("registry.tasks.PurgeOldTags")
// Reduce client logging.
client.logger.SetLevel(logging.LevelError)
client.logger.Logger.SetLevel(logrus.ErrorLevel)
dryRunText := ""
if purgeDryRun {