fix: reduce warn levels to debug for non-actionable errors (#3645)

Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
Keith Zantow
2025-02-07 13:22:55 -05:00
committed by GitHub
parent 52d543f3c1
commit 2328b20082
42 changed files with 85 additions and 85 deletions
+3 -3
View File
@@ -68,13 +68,13 @@ func (c *storeCataloger) Catalog(ctx context.Context, resolver file.Resolver) ([
p := &pkgs[i]
locations := p.Locations.ToSlice()
if len(locations) == 0 {
log.WithFields("package", p.Name).Warn("nix package has no evidence locations associated")
log.WithFields("package", p.Name).Debug("nix package has no evidence locations associated")
continue
}
parentStorePath := locations[0].RealPath
files, ok := filesByPath[parentStorePath]
if !ok {
log.WithFields("path", parentStorePath, "nix-store-path", parentStorePath).Warn("found a nix store file for a non-existent package")
log.WithFields("path", parentStorePath, "nix-store-path", parentStorePath).Debug("found a nix store file for a non-existent package")
continue
}
appendFiles(p, files.ToSlice()...)
@@ -86,7 +86,7 @@ func (c *storeCataloger) Catalog(ctx context.Context, resolver file.Resolver) ([
func appendFiles(p *pkg.Package, location ...file.Location) {
metadata, ok := p.Metadata.(pkg.NixStoreEntry)
if !ok {
log.WithFields("package", p.Name).Warn("nix package metadata missing")
log.WithFields("package", p.Name).Debug("nix package metadata missing")
return
}