diff --git a/core/event/logfile.go b/core/event/logfile.go index 608f3f8..c60e7b2 100644 --- a/core/event/logfile.go +++ b/core/event/logfile.go @@ -86,10 +86,11 @@ func (lf *LogFile) BuildTickChannel() <-chan []string { for _, line := range strings.Split(data, lf.lineBreaker) { eventData := []string{"log-file", lf.filePath, line} matches := lf.matcher.FindStringSubmatch(line) - names := lf.matcher.SubexpNames() - - eventData = append(eventData, reshapeRegxpMatch(names, matches)...) if matches != nil { + names := lf.matcher.SubexpNames() + + eventData = append(eventData, reshapeRegxpMatch(names, matches)...) + notifyChan <- eventData } }