From e9499670227fff63a688eed6499bcca3e049ebc4 Mon Sep 17 00:00:00 2001 From: Alex Payne Date: Sat, 13 Sep 2014 13:52:51 -0700 Subject: [PATCH] Remove cruft. --- hooks/papertrail/papertrail.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/hooks/papertrail/papertrail.go b/hooks/papertrail/papertrail.go index 71c5835..48e2fea 100644 --- a/hooks/papertrail/papertrail.go +++ b/hooks/papertrail/papertrail.go @@ -32,18 +32,8 @@ 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.Data["level"], entry.Message) - line, err := entry.String() bytesWritten, err := hook.UDPConn.Write([]byte(payload)) if err != nil { - fmt.Fprintf(os.Stderr, "Unable to read entry, %v", err) - return err - } - - payload := fmt.Sprintf("<22> %s %s: [%s] %s", date, hook.AppName, entry.Data["level"], line) - - _, err = hook.UDPConn.Write([]byte(payload)) - if err != nil { - fmt.Fprintf(os.Stderr, "Unable to send log line to Papertrail via UDP, %v", err) fmt.Fprintf(os.Stderr, "Unable to send log line to Papertrail via UDP. Wrote %d bytes before error: %v", bytesWritten, err) return err }