1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #40234 from Jonas-Heinrich/40232-comply-with-gelf-spec

Change gelf logger to comply with gelf spec
This commit is contained in:
Akihiro Suda 2019-11-26 12:06:47 +09:00 committed by GitHub
commit a4a0429eec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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