From 54b391f77ce9ac57aa5ef98afc4e82283fc62288 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Sun, 24 Sep 2017 16:24:34 +0200 Subject: [PATCH] tcp outlet: add newline after each entry otherwise tools like graylog don't parse it --- cmd/logging_outlets.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/logging_outlets.go b/cmd/logging_outlets.go index ba34b8e..e8df81a 100644 --- a/cmd/logging_outlets.go +++ b/cmd/logging_outlets.go @@ -62,6 +62,9 @@ func (h *TCPOutlet) WriteEntry(ctx context.Context, e logger.Entry) error { } _, err = h.conn.Write(b) + if err == nil { + _, err = h.conn.Write([]byte("\n")) + } if err != nil { return errors.Wrap(err, "cannot write") h.conn.Close()