Return new Syslog instance for each plugin (#5372)

This commit is contained in:
Daniel Nelson 2019-02-04 11:21:16 -08:00 committed by GitHub
parent 6b144db504
commit 00734c56c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 12 deletions

View File

@ -438,16 +438,16 @@ func getNanoNow() time.Time {
}
func init() {
receiver := &Syslog{
Address: ":6514",
now: getNanoNow,
ReadTimeout: &internal.Duration{
Duration: defaultReadTimeout,
},
Framing: OctetCounting,
Trailer: nontransparent.LF,
Separator: "_",
}
inputs.Add("syslog", func() telegraf.Input { return receiver })
inputs.Add("syslog", func() telegraf.Input {
return &Syslog{
Address: ":6514",
now: getNanoNow,
ReadTimeout: &internal.Duration{
Duration: defaultReadTimeout,
},
Framing: OctetCounting,
Trailer: nontransparent.LF,
Separator: "_",
}
})
}