From a31435c8a2c4560b6e1a0e84450c45490fa587be Mon Sep 17 00:00:00 2001 From: Marius Sturm Date: Fri, 11 Dec 2015 10:25:44 +0100 Subject: [PATCH] dont trim gelf log message Signed-off-by: Marius Sturm --- daemon/logger/gelf/gelf.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/daemon/logger/gelf/gelf.go b/daemon/logger/gelf/gelf.go index 2387028913..b42eb61b2c 100644 --- a/daemon/logger/gelf/gelf.go +++ b/daemon/logger/gelf/gelf.go @@ -96,9 +96,6 @@ func New(ctx logger.Context) (logger.Logger, error) { } func (s *gelfLogger) Log(msg *logger.Message) error { - // remove trailing and leading whitespace - short := bytes.TrimSpace([]byte(msg.Line)) - level := gelf.LOG_INFO if msg.Source == "stderr" { level = gelf.LOG_ERR @@ -107,7 +104,7 @@ func (s *gelfLogger) Log(msg *logger.Message) error { m := gelf.Message{ Version: "1.1", Host: s.hostname, - Short: string(short), + Short: string(msg.Line), TimeUnix: float64(msg.Timestamp.UnixNano()/int64(time.Millisecond)) / 1000.0, Level: level, Extra: s.extra,