Update syslog.go

This commit is contained in:
aluvare 2021-02-11 16:44:09 +01:00 committed by GitHub
parent f160b155bb
commit 13ea9712b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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