Cleanup syslog messages

Remove leading and trailing spaces and/or newlines from syslog message
field.
This commit is contained in:
Greg Linton 2018-07-02 18:11:54 -06:00
parent 839ca60b0e
commit 06682c6350
1 changed files with 1 additions and 1 deletions

View File

@ -395,7 +395,7 @@ func fields(msg rfc5424.SyslogMessage, s *Syslog) map[string]interface{} {
} }
if msg.Message() != nil { if msg.Message() != nil {
flds["message"] = *msg.Message() flds["message"] = strings.TrimSpace(*msg.Message())
} }
if msg.StructuredData() != nil { if msg.StructuredData() != nil {