Skip to content

Commit

Permalink
[chore] [pkg/stanza] Fix closing file error message (open-telemetry#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryax committed Apr 10, 2023
1 parent 795a094 commit 2e9f927
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/stanza/fileconsumer/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ OUTER:
fp := fps[i]
if len(fp.FirstBytes) == 0 {
if err := files[i].Close(); err != nil {
m.Errorf("problem closing file", "file", files[i].Name())
m.Errorf("problem closing file %s", files[i].Name())
}
// Empty file, don't read it until we can compare its fingerprint
fps = append(fps[:i], fps[i+1:]...)
Expand All @@ -237,7 +237,7 @@ OUTER:
if fp.StartsWith(fp2) || fp2.StartsWith(fp) {
// Exclude
if err := files[i].Close(); err != nil {
m.Errorf("problem closing file", "file", files[i].Name())
m.Errorf("problem closing file %s", files[i].Name())
}
fps = append(fps[:i], fps[i+1:]...)
files = append(files[:i], files[i+1:]...)
Expand Down

0 comments on commit 2e9f927

Please sign in to comment.