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

dont trim gelf log message

Signed-off-by: Marius Sturm <marius@graylog.com>
This commit is contained in:
Marius Sturm 2015-12-11 10:25:44 +01:00
parent 23bd9b881f
commit a31435c8a2

View file

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