Skip to content

Commit

Permalink
Add warning when file input has no matches
Browse files Browse the repository at this point in the history
  • Loading branch information
camdencheek committed Jul 10, 2020
1 parent 9e89fd4 commit 541d164
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugin/builtin/input/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ func (f *FileInput) Start() error {
return
case <-globTicker.C:
matches := getMatches(f.Include, f.Exclude)
if firstCheck && len(matches) == 0 {
f.Warnw("no files match the configured include patterns", "include", f.Include)
}
for _, match := range matches {
f.checkFile(ctx, match, firstCheck)
}
Expand Down

0 comments on commit 541d164

Please sign in to comment.