From 60d80a6d2cd3e43751c757328082c06f34611b75 Mon Sep 17 00:00:00 2001 From: xi3 Date: Fri, 19 Dec 2014 21:11:58 +0800 Subject: [PATCH] Update papertrail.go Report all log data, not just the entry.message. --- hooks/papertrail/papertrail.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hooks/papertrail/papertrail.go b/hooks/papertrail/papertrail.go index 12c56f2..c0f10c1 100644 --- a/hooks/papertrail/papertrail.go +++ b/hooks/papertrail/papertrail.go @@ -30,7 +30,8 @@ func NewPapertrailHook(host string, port int, appName string) (*PapertrailHook, // Fire is called when a log event is fired. func (hook *PapertrailHook) Fire(entry *logrus.Entry) error { date := time.Now().Format(format) - payload := fmt.Sprintf("<22> %s %s: [%s] %s", date, hook.AppName, entry.Level, entry.Message) + msg, _ := entry.String() + payload := fmt.Sprintf("<22> %s %s: %s", date, hook.AppName, msg) bytesWritten, err := hook.UDPConn.Write([]byte(payload)) if err != nil {