From 5e557bb2d85c948215eeff086f967bba0b8e2a5e Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Fri, 23 Feb 2018 09:11:47 -0800 Subject: [PATCH] add debug logs to vault implementation --- plugins/secrets/vault/vault.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/secrets/vault/vault.go b/plugins/secrets/vault/vault.go index e1b558633..dc6871167 100644 --- a/plugins/secrets/vault/vault.go +++ b/plugins/secrets/vault/vault.go @@ -92,17 +92,24 @@ func (v *vault) list(repo *model.Repo, build *model.Build) ([]*model.Secret, err continue } + logrus.Debugf("vault: read secret: %s", path) + vaultSecret, err := v.get(path) if err != nil { + logrus.Debugf("vault: read secret failed: %s: %s", path, err) return nil, err } if vaultSecret == nil { + logrus.Debugf("vault: read secret failed: %s: not found or empty value", path) continue } if !vaultSecret.Match(repo.FullName) { + logrus.Debugf("vault: read secret: %s: restricted: %s", path, repo.FullName) continue } + logrus.Debugf("vault: read secret success: %s", err) + secrets = append(secrets, &model.Secret{ Name: key, Value: vaultSecret.Value, @@ -133,7 +140,7 @@ func (v *vault) start() { if v.done != nil { close(v.done) } - logrus.Debugf("vault: token renewal enabled: renew every %v", v.renew) + logrus.Infof("vault: token renewal enabled: renew every %v", v.renew) v.done = make(chan struct{}) if v.renew != 0 { go v.renewLoop()