Skip to content

Commit 15451b5

Browse files
fixing issue where error is silently swallowed, as well updating log line
1 parent bbd42f5 commit 15451b5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

plugins/inputs/filecount/filecount.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,10 @@ func (fc *FileCount) count(acc telegraf.Accumulator, basedir string, glob globpa
236236
})
237237
if err != nil {
238238
if errors.Is(err, context.DeadlineExceeded) {
239-
fc.Log.Warnf("Timeout exceeded while walking %q; results not emitted", basedir)
239+
fc.Log.Warnf("Timeout exceeded while walking %q", basedir)
240240
return
241241
}
242+
acc.AddError(err)
242243
}
243244
}
244245

0 commit comments

Comments
 (0)