Skip to content

Commit

Permalink
refactor: improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen committed Nov 10, 2024
1 parent 7070fb9 commit 3e87499
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,11 @@ func (p *Provider) discoverSignature(version string) error { //nolint:gocyclo
// Note: we want to look for the best binary by looking at binaries, archives and unknowns
for _, t := range []asset.Type{asset.Signature} {
if len(fileScored[t]) > 0 {
logger.Tracef("top scored (%d): %s (%d)", t, fileScored[t][0].Key, fileScored[t][0].Value)
logger.WithField("type", "signature").Tracef("top scored (%d): %s (%d)", t, fileScored[t][0].Key, fileScored[t][0].Value)

topScored := fileScored[t][0]
if topScored.Value < 40 {
logger.Tracef("skipped > (%d) too low: %s (%d)", t, topScored.Key, topScored.Value)
logger.WithField("type", "signature").Tracef("skipped > (%d) too low: %s (%d)", t, topScored.Key, topScored.Value)
continue
}
for _, a := range p.Assets {
Expand Down Expand Up @@ -627,7 +627,7 @@ func (p *Provider) verifyCosignSignature() error { //nolint:gocyclo
return err
}
if err := json.Unmarshal(sigData, &bundle); err != nil {
log.WithError(err).Trace("unable to parse json for bundle signature")
log.WithError(err).Debug("unable to parse json for bundle signature")
}

if bundle == nil {
Expand Down
1 change: 1 addition & 0 deletions pkg/source/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ func (s *GitHub) FindRelease(ctx context.Context) error {

return err
}

for _, r := range releases {
includePreReleases := s.Options.Settings["include-pre-releases"].(bool)
if includePreReleases && r.GetPrerelease() {
Expand Down

0 comments on commit 3e87499

Please sign in to comment.