logrus: github.com/sirupsen/logrus/hooks/syslog Index | Files

package syslog

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


Package Files


type SyslogHook Uses

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

SyslogHook to send logs via syslog.

func NewSyslogHook Uses

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 Uses

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

func (*SyslogHook) Levels Uses

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

Package syslog imports 4 packages (graph) and is imported by 105 packages. Updated 2019-10-08. Refresh now. Tools for package owners.