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:
commit
a4a0429eec
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 {
|
func (s *gelfLogger) Log(msg *logger.Message) error {
|
||||||
|
if len(msg.Line) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
level := gelf.LOG_INFO
|
level := gelf.LOG_INFO
|
||||||
if msg.Source == "stderr" {
|
if msg.Source == "stderr" {
|
||||||
level = gelf.LOG_ERR
|
level = gelf.LOG_ERR
|
||||||
|
|
Loading…
Add table
Reference in a new issue