gol: github.com/goburrow/gol/syslog Index | Files

package syslog

import "github.com/goburrow/gol/syslog"

Package syslog provides logging to syslog.

Index

Package Files

syslog.go syslog_unix.go

type Appender Uses

type Appender struct {
    // Known networks are "tcp", "tcp4", "tcp6", "udp", "udp4", "udp6",
    // "ip", "ip4", "ip6", "unix", "unixgram" and "unixpacket".
    // See tcp.Dial.
    Network  string
    Addr     string
    Facility Facility
    Tag      string
    // contains filtered or unexported fields
}

Appender sends logging to syslog server/daemon. All properties must be set before Start(), otherwise default values will be used.

func NewAppender Uses

func NewAppender() *Appender

NewAppender allocates and returns a new Appender.

func (*Appender) Append Uses

func (a *Appender) Append(event *gol.LoggingEvent)

Append encodes the given logging event and sends to syslog connection.

func (*Appender) Start Uses

func (a *Appender) Start() error

Start connects to syslog server if not connected.

func (*Appender) Stop Uses

func (a *Appender) Stop() error

Stop disconnects current connection.

type Facility Uses

type Facility int

Facility is the syslog facility.

const (
    LOG_KERN Facility = iota
    LOG_USER
    LOG_MAIL
    LOG_DAEMON
    LOG_AUTH
    LOG_SYSLOG
    LOG_LPR
    LOG_NEWS
    LOG_UUCP
    LOG_CRON
    LOG_AUTHPRIV
    LOG_FTP

    LOG_LOCAL0
    LOG_LOCAL1
    LOG_LOCAL2
    LOG_LOCAL3
    LOG_LOCAL4
    LOG_LOCAL5
    LOG_LOCAL6
    LOG_LOCAL7
)

Facility

Package syslog imports 9 packages (graph) and is imported by 1 packages. Updated 2016-11-06. Refresh now. Tools for package owners.