Skip to content

Commit

Permalink
fix: Fix panic in logparser due to missing Log. (#10296)
Browse files Browse the repository at this point in the history
(cherry picked from commit a57aadd)
  • Loading branch information
srebhan authored and powersj committed Jan 5, 2022
1 parent a979f2b commit e57ed6b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/inputs/logparser/logparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/influxdata/tail"
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/internal/globpath"
"github.com/influxdata/telegraf/models"
"github.com/influxdata/telegraf/plugins/inputs"
"github.com/influxdata/telegraf/plugins/parsers"
)
Expand Down Expand Up @@ -184,6 +185,7 @@ func (l *LogParserPlugin) Start(acc telegraf.Accumulator) error {
if err != nil {
return err
}
models.SetLoggerOnPlugin(l.GrokParser, l.Log)

l.wg.Add(1)
go l.parser()
Expand Down

0 comments on commit e57ed6b

Please sign in to comment.