Skip to content

Commit

Permalink
adjust debug logging in a few places
Browse files Browse the repository at this point in the history
  • Loading branch information
aetaric committed Jul 27, 2023
1 parent e4f0ef0 commit d54d6b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions check/checkrr.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (c *Checkrr) Run() {
log.Debug(c.config.GetStringSlice("checkpath"))

for _, path := range c.config.GetStringSlice("checkpath") {
log.WithFields(log.Fields{"startup": true}).Debug("Path: %v", path)
log.WithFields(log.Fields{"startup": true}).Debugf("Path: %v", path)

filepath.WalkDir(path, func(path string, d os.DirEntry, err error) error {
if err != nil {
Expand Down Expand Up @@ -143,7 +143,7 @@ func (c *Checkrr) Run() {
filehash := imohash.New()
sum, _ := filehash.SumFile(path)

log.WithFields(log.Fields{"DB Hash": "Found", "File Hash": "Computed"}).Debug("File Hash: %x", hex.EncodeToString(sum[:]))
log.WithFields(log.Fields{"DB Hash": "Found", "File Hash": "Computed"}).Debugf("File Hash: %x", hex.EncodeToString(sum[:]))

if hex.EncodeToString(sum[:]) != hex.EncodeToString(hash[:]) {
log.WithFields(log.Fields{"Hash Match": false}).Infof("\"%v\"", path)
Expand Down

0 comments on commit d54d6b5

Please sign in to comment.