syslog

package
v0.0.0-...-b8a1a0e Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ES_APP  = "observatrace_system_log__0_"
	ES_TYPE = "events"

	BULK_SIZE = 8192

	RECONNECT_INTERVAL = time.Minute
)
View Source
const (
	LOG_TYPE   = "daemon"
	LOG_MODULE = "trident"
)
View Source
const (
	BUFSIZE = 4096
)
View Source
const (
	QUEUE_BATCH_SIZE = 1024
)

Variables

This section is empty.

Functions

func NewSyslogWriter

func NewSyslogWriter(in queue.QueueReader, logToFileEnabled, esEnabled bool, directory string, esAddresses []string, esUsername, esPassword string) *syslogWriter

Types

type DailyRotateWriter

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

func NewRotateWriter

func NewRotateWriter(filename string) *DailyRotateWriter

func (*DailyRotateWriter) Close

func (w *DailyRotateWriter) Close() error

func (*DailyRotateWriter) Flush

func (w *DailyRotateWriter) Flush() error

func (*DailyRotateWriter) Write

func (w *DailyRotateWriter) Write(p []byte) (n int, err error)

type ESLog

type ESLog struct {
	Timestamp uint32 `json:"timestamp"`
	Type      string `json:"type"`
	Host      string `json:"host"`
	Module    string `json:"module"`
	Severity  string `json:"severity"`
	SyslogTag string `json:"syslogtag"`
	Message   string `json:"message"`
}

type ESLogger

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

func NewESLogger

func NewESLogger(addresses []string, username, password string) *ESLogger

func (*ESLogger) Flush

func (l *ESLogger) Flush()

func (*ESLogger) Log

func (l *ESLogger) Log(esLog *ESLog)

Jump to

Keyboard shortcuts

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