logrus_syslog - ActiveState ActiveGo 1.8

Package logrus_syslog

import "github.com/sirupsen/logrus/hooks/syslog"

Overview ▾

type SyslogHook

SyslogHook to send logs via syslog.

type SyslogHook struct {
    Writer        *syslog.Writer
    SyslogNetwork string
    SyslogRaddr   string

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) Fire

func (hook *SyslogHook) Fire(entry *logrus.Entry) error

func (*SyslogHook) Levels

func (hook *SyslogHook) Levels() []logrus.Level