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)