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
+1 -1
View File
@@ -80,7 +80,7 @@ func defaultGoModDir() string {
if goPath == "" {
homeDir, err := homedir.Dir()
if err != nil {
log.Warnf("unable to determine GOPATH or user home dir: %w", err)
log.Debugf("unable to determine GOPATH or user home dir: %w", err)
return ""
}
goPath = filepath.Join(homeDir, "go")
+1 -1
View File
@@ -60,7 +60,7 @@ func newGoLicenseResolver(catalogerName string, opts CatalogerConfig) goLicenseR
if vendorDir == "" {
wd, err := os.Getwd()
if err != nil {
log.Warn("unable to get CWD while resolving the local go vendor dir: %v", err)
log.Debug("unable to get CWD while resolving the local go vendor dir: %v", err)
} else {
vendorDir = filepath.Join(wd, "vendor")
}
+1 -1
View File
@@ -26,7 +26,7 @@ func scanFile(location file.Location, reader unionreader.UnionReader) ([]*extend
// with more than one binary
readers, errs := unionreader.GetReaders(reader)
if errs != nil {
log.WithFields("error", errs).Warnf("failed to open a golang binary")
log.WithFields("error", errs).Debug("failed to open a golang binary")
return nil, fmt.Errorf("failed to open a golang binary: %w", errs)
}