less logging

Signed-off-by: Jess Frazelle <acidburn@google.com>
This commit is contained in:
Jess Frazelle 2017-03-04 20:13:25 -08:00
parent ce8d46aa0c
commit acc5f0ce59
No known key found for this signature in database
GPG key ID: 18F3685C0022BFF3

View file

@ -297,14 +297,18 @@ func createStaticIndex(r *registry.Registry, staticDir, clairURI string) error {
if clairURI != "" { if clairURI != "" {
wg.Add(1) wg.Add(1)
go func(repo, tag string) { go func(repo, tag string) {
defer wg.Done() defer wg.Done()
logrus.Infof("creating vulns.txt for %s:%s", repo, tag) logrus.Infof("creating vulns.txt for %s:%s", repo, tag)
if err := createVulnStaticPage(r, staticDir, clairURI, repo, tag); err != nil { if err := createVulnStaticPage(r, staticDir, clairURI, repo, tag); err != nil {
// return fmt.Errorf("creating vuln static page for %s:%s failed: %v", repo, tag, err) // return fmt.Errorf("creating vuln static page for %s:%s failed: %v", repo, tag, err)
logrus.Warnf("creating vuln static page for %s:%s failed: %v", repo, tag, err) logrus.Warnf("creating vuln static page for %s:%s failed: %v", repo, tag, err)
} }
}(repo, tag) }(repo, tag)
newrepo.VulnURI = filepath.Join(repo, tag, "vulns.txt") newrepo.VulnURI = filepath.Join(repo, tag, "vulns.txt")
} }
repos = append(repos, newrepo) repos = append(repos, newrepo)
@ -366,7 +370,7 @@ func createVulnStaticPage(r *registry.Registry, staticDir, clairURI, repo, tag s
} }
// initialize clair // initialize clair
cr, err := clair.New(clairURI, true) cr, err := clair.New(clairURI, false)
if err != nil { if err != nil {
return err return err
} }