Skip to content

Commit

Permalink
fix error logging aggregation
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Jaglowski <jaglows3@gmail.com>
  • Loading branch information
pandres-varian and djaglowski authored May 13, 2024
1 parent f962c35 commit 38d55ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extension/storage/filestorage/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,19 +358,19 @@ func (c *fileStorageClient) cleanup(compactionDirectory string) error {
return err
}

var errs error
var errs []error
for _, item := range contents {
err = os.Remove(item)
if err == nil {
c.logger.Debug("cleanup",
zap.String("deletedFile", item))
} else {
errs = errors.Join(errs, err)
errs = append(errs, err)
}
}
if errs != nil {
c.logger.Info("cleanup errors",
zap.Error(errs))
zap.Error(errors.Join(errs...)))
}
return nil
}

0 comments on commit 38d55ed

Please sign in to comment.