syslog

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPriority = syslog.LOG_WARNING | syslog.LOG_DAEMON
)

Variables

View Source
var ErrToType = map[string]int{
	"file content mismatch": 1,
	"new file found":        2,
	"file deleted":          3,
	alerts.HeartbeatEvent:   4,
}

Functions

This section is empty.

Types

type SyslogClient

type SyslogClient struct {
	// contains filtered or unexported fields
}

func New

func New(logger *logrus.Logger, network, addr string, priority syslog.Priority, hostName, tag string) (*SyslogClient, error)

New creates syslog client priority syslog.LOG_WARNING|syslog.LOG_DAEMON hostName custom hostname if empty use host a name obtained from os.Hostname()

func (*SyslogClient) Close

func (sl *SyslogClient) Close()

func (*SyslogClient) Send

func (sl *SyslogClient) Send(alert alerts.Alert) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL