Merge pull request #41075 from wangyumu/fix-syslog-empty-lines

Fixes #41010 skip empty lines
This commit is contained in:
Brian Goff 2020-06-11 12:53:37 -07:00 committed by GitHub
commit d984d3053b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -132,6 +132,10 @@ func New(info logger.Info) (logger.Logger, error) {
}
func (s *syslogger) Log(msg *logger.Message) error {
if len(msg.Line) == 0 {
return nil
}
line := string(msg.Line)
source := msg.Source
logger.PutMessage(msg)