Test for nil metric before reading tags in logparser
This commit is contained in:
parent
032348c7a5
commit
9bc13f143e
|
@ -254,9 +254,9 @@ func (l *LogParserPlugin) parser() {
|
|||
for _, parser := range l.parsers {
|
||||
m, err = parser.ParseLine(entry.line)
|
||||
if err == nil {
|
||||
tags := m.Tags()
|
||||
tags["path"] = entry.path
|
||||
if m != nil {
|
||||
tags := m.Tags()
|
||||
tags["path"] = entry.path
|
||||
l.acc.AddFields(m.Name(), m.Fields(), tags, m.Time())
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue