go-syslog: github.com/hashicorp/go-syslog Index | Files

package gsyslog

import "github.com/hashicorp/go-syslog"

Index

Package Files

builtin.go syslog.go unix.go

type Priority Uses

type Priority int

Priority maps to the syslog priority levels

const (
    LOG_EMERG Priority = iota
    LOG_ALERT
    LOG_CRIT
    LOG_ERR
    LOG_WARNING
    LOG_NOTICE
    LOG_INFO
    LOG_DEBUG
)

type Syslogger Uses

type Syslogger interface {
    // WriteLevel is used to write a message at a given level
    WriteLevel(Priority, []byte) error

    // Write is used to write a message at the default level
    Write([]byte) (int, error)

    // Close is used to close the connection to the logger
    Close() error
}

Syslogger interface is used to write log messages to syslog

func DialLogger Uses

func DialLogger(network, raddr string, p Priority, facility, tag string) (Syslogger, error)

DialLogger is used to construct a new Syslogger that establishes connection to remote syslog server

func NewLogger Uses

func NewLogger(p Priority, facility, tag string) (Syslogger, error)

NewLogger is used to construct a new Syslogger

Package gsyslog imports 8 packages (graph) and is imported by 119 packages. Updated 2017-08-29. Refresh now. Tools for package owners.