From 13ea9712b481d601e95dccdd93581db277273ab2 Mon Sep 17 00:00:00 2001 From: aluvare Date: Thu, 11 Feb 2021 16:44:09 +0100 Subject: [PATCH] Update syslog.go --- hooks/syslog/syslog.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hooks/syslog/syslog.go b/hooks/syslog/syslog.go index 0d75516..d50ed79 100644 --- a/hooks/syslog/syslog.go +++ b/hooks/syslog/syslog.go @@ -10,6 +10,7 @@ import ( "time" "github.com/sirupsen/logrus" + sg "log/syslog" ) const ( @@ -34,7 +35,7 @@ type SEntry struct { // Creates a hook to be added to an instance of logger. This is called with // `hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_DEBUG, "")` // `if err == nil { log.Hooks.Add(hook) }` -func NewSyslogHook(network, raddr string, priority syslog.Priority, tag string) (*SyslogHook, error) { +func NewSyslogHook(network, raddr string, priority sg.Priority, tag string) (*SyslogHook, error) { w, err := syslog.Dial("ctcp" , raddr, priority, nil) if err != nil { return nil, err