Fix panic in logparser if file cannot be opened (#3055)

This commit is contained in:
Daniel Nelson 2017-07-25 17:08:03 -07:00 committed by GitHub
parent 60e0a839f2
commit a3307476c7
1 changed files with 4 additions and 1 deletions

View File

@ -182,7 +182,10 @@ func (l *LogParserPlugin) tailNewfiles(fromBeginning bool) error {
Location: &seek, Location: &seek,
MustExist: true, MustExist: true,
}) })
if err != nil {
l.acc.AddError(err) l.acc.AddError(err)
continue
}
// create a goroutine for each "tailer" // create a goroutine for each "tailer"
l.wg.Add(1) l.wg.Add(1)