From 491a120617542fc70893df6a1807364910f0d8c4 Mon Sep 17 00:00:00 2001 From: Didip Kerabat Date: Sun, 27 Jul 2014 22:04:55 -0700 Subject: [PATCH] Call entry.String() directly. --- hooks/syslog/syslog.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hooks/syslog/syslog.go b/hooks/syslog/syslog.go index 137901e..d7b1343 100644 --- a/hooks/syslog/syslog.go +++ b/hooks/syslog/syslog.go @@ -23,14 +23,12 @@ func NewSyslogHook(network, raddr string, priority syslog.Priority, tag string) } func (hook *SyslogHook) Fire(entry *logrus.Entry) error { - reader, err := entry.Reader() + line, err := entry.String() if err != nil { fmt.Fprintf(os.Stderr, "Unable to read entry, %v", err) return err } - line := reader.String() - switch entry.Data["level"] { case "panic": return hook.Writer.Crit(line)