1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

feat(logging): replace all the loggers with zerolog EE-4186 (#7663)

This commit is contained in:
andres-portainer 2022-09-16 13:18:44 -03:00 committed by GitHub
parent 53025178ef
commit 36e7981ab7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
109 changed files with 1101 additions and 662 deletions

View file

@ -3,11 +3,11 @@ package registryutils
import (
"time"
log "github.com/sirupsen/logrus"
portainer "github.com/portainer/portainer/api"
"github.com/portainer/portainer/api/aws/ecr"
"github.com/portainer/portainer/api/dataservices"
"github.com/rs/zerolog/log"
)
func isRegTokenValid(registry *portainer.Registry) (valid bool) {
@ -37,11 +37,11 @@ func parseRegToken(registry *portainer.Registry) (username, password string, err
func EnsureRegTokenValid(dataStore dataservices.DataStore, registry *portainer.Registry) (err error) {
if registry.Type == portainer.EcrRegistry {
if isRegTokenValid(registry) {
log.Println("[DEBUG] [registry, GetEcrAccessToken] [message: current ECR token is still valid]")
log.Debug().Msg("current ECR token is still valid")
} else {
err = doGetRegToken(dataStore, registry)
if err != nil {
log.Println("[DEBUG] [registry, GetEcrAccessToken] [message: refresh ECR token]")
log.Debug().Msg("refresh ECR token")
}
}
}