Merge pull request #427 from thaJeztah/19.03_backport_40232-comply_with_gelf_spec
[19.03 backport] logger/gelf: Skip empty lines to comply with spec
This commit is contained in:
commit
cf14fa7a23
1 changed files with 4 additions and 0 deletions
|
@ -166,6 +166,10 @@ func newGELFUDPWriter(address string, info logger.Info) (gelf.Writer, error) {
|
|||
}
|
||||
|
||||
func (s *gelfLogger) Log(msg *logger.Message) error {
|
||||
if len(msg.Line) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
level := gelf.LOG_INFO
|
||||
if msg.Source == "stderr" {
|
||||
level = gelf.LOG_ERR
|
||||
|
|
Loading…
Reference in a new issue