Skip to content

Commit

Permalink
fix(inputs.syslog): print error when no error or message given (#11997)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6fa06d4)
  • Loading branch information
powersj authored and Alan Pope committed Nov 2, 2022
1 parent 7c9a480 commit ed156ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/inputs/syslog/syslog.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ func (s *Syslog) listenPacket(acc telegraf.Accumulator) {
if err != nil {
acc.AddError(err)
}
if err == nil && message == nil {
acc.AddError(fmt.Errorf("unable to parse message: %s", string(b[:n])))
}
}
}

Expand Down

0 comments on commit ed156ca

Please sign in to comment.