From dbf7fad1dc0a62e1cba6e69bcb6437273eda1d06 Mon Sep 17 00:00:00 2001 From: Alex Payne Date: Sat, 13 Sep 2014 13:04:25 -0700 Subject: [PATCH] Don't disconnect on every Fire() --- hooks/papertrail/papertrail.go | 1 - 1 file changed, 1 deletion(-) diff --git a/hooks/papertrail/papertrail.go b/hooks/papertrail/papertrail.go index 57d07c0..add8dcd 100644 --- a/hooks/papertrail/papertrail.go +++ b/hooks/papertrail/papertrail.go @@ -29,7 +29,6 @@ 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 { - defer hook.UDPConn.Close() date := time.Now().Format(format) payload := fmt.Sprintf("<22> %s %s: [%s] %s", date, hook.AppName, entry.Data["level"], entry.Message)