Skip to content

Commit

Permalink
fix: ensure debug log passes data to log function
Browse files Browse the repository at this point in the history
Previously as this log is reading from a channel the log would read an
empty string which resulted in an error.

Signed-off-by: Bradley Jones <bradley.jones@anchore.com>
  • Loading branch information
bradleyjones committed Jan 5, 2023
1 parent 22333dd commit 806467d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ecg/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func PeriodicallyGetInventoryReport(cfg *config.Application) {
}

// Wait at least as long as the ticker
log.Debug("Start new gather", <-ticker.C)
log.Debugf("Start new gather %s", <-ticker.C)
}
}

Expand Down
1 change: 1 addition & 0 deletions ecg/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ type Logger interface {
Warn(msg string, args ...interface{})
Info(msg string, args ...interface{})
Debug(msg string, args ...interface{})
Debugf(msg string, args ...interface{})
}

0 comments on commit 806467d

Please sign in to comment.