mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-22 07:10:41 -08:00
refactor: replace zap with slog (#6466)
Signed-off-by: knqyf263 <knqyf263@gmail.com> Co-authored-by: Nikita Pivkin <nikita.pivkin@smartforce.io> Co-authored-by: simar7 <1254783+simar7@users.noreply.github.com>
This commit is contained in:
@@ -48,15 +48,15 @@ func (u *Updater) Update() error {
|
||||
if !errors.Is(err, os.ErrNotExist) {
|
||||
return xerrors.Errorf("Java DB metadata error: %w", err)
|
||||
} else if u.skip {
|
||||
log.Logger.Error("The first run cannot skip downloading Java DB")
|
||||
log.Error("The first run cannot skip downloading Java DB")
|
||||
return xerrors.New("'--skip-java-db-update' cannot be specified on the first run")
|
||||
}
|
||||
}
|
||||
|
||||
if (meta.Version != SchemaVersion || meta.NextUpdate.Before(time.Now().UTC())) && !u.skip {
|
||||
// Download DB
|
||||
log.Logger.Infof("Java DB Repository: %s", u.repo)
|
||||
log.Logger.Info("Downloading the Java DB...")
|
||||
log.Info("Java DB Repository", log.Any("repository", u.repo))
|
||||
log.Info("Downloading the Java DB...")
|
||||
|
||||
// TODO: support remote options
|
||||
var a *oci.Artifact
|
||||
@@ -78,7 +78,7 @@ func (u *Updater) Update() error {
|
||||
if err = metac.Update(meta); err != nil {
|
||||
return xerrors.Errorf("Java DB metadata update error: %w", err)
|
||||
}
|
||||
log.Logger.Info("The Java DB is cached for 3 days. If you want to update the database more frequently, " +
|
||||
log.Info("The Java DB is cached for 3 days. If you want to update the database more frequently, " +
|
||||
"the '--reset' flag clears the DB cache.")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user