we shouldn't log tokens, this shouldn't have been info either and was noisy (#1249)

* we shouldn't log tokens, this shouldn't have been info either and was noisy

* simplify logic too
This commit is contained in:
Reed Allman
2018-09-27 15:37:35 -07:00
committed by Owen Cliffe
parent 651b49e1bc
commit 319e0af41c

View File

@@ -1358,15 +1358,7 @@ func (c *container) WriteStat(ctx context.Context, stat drivers.Stat) {
// DockerAuth implements the docker.AuthConfiguration interface.
func (c *container) DockerAuth() (*docker.AuthConfiguration, error) {
logger := common.Logger(context.TODO())
registryToken := ""
var ok bool
if registryToken, ok = c.extensions[RegistryToken]; !ok {
logger.WithField("Image", c.image).Infoln("No Registry Token for image")
registryToken = ""
} else {
logger.WithField("Image", c.image).Infof("Registry Token %s", registryToken)
}
registryToken := c.extensions[RegistryToken]
if registryToken != "" {
return &docker.AuthConfiguration{
RegistryToken: registryToken,