Documentation ¶
Index ¶
Constants ¶
View Source
const ( NUM_SYSLOG_WORKERS = 8 CHANNEL_DEPTH = 8192 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SyslogHook ¶
type SyslogHook struct { Writer *syslog.Writer SyslogNetwork string SyslogRaddr string Tag string // contains filtered or unexported fields }
SyslogHook to send logs via syslog.
func NewSyslogHook ¶
func NewSyslogHook(network, raddr string, priority syslog.Priority, tag string) (*SyslogHook, error)
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 (*SyslogHook) Levels ¶
func (hook *SyslogHook) Levels() []logrus.Level
Click to show internal directories.
Click to hide internal directories.