Test for nil metric before reading tags in logparser
This commit is contained in:
parent
71c567fb87
commit
064071ba51
|
@ -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