syslog

package
v0.0.0-...-ba854f2 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: Apache-2.0 Imports: 16 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidSyslogFacility represents the invalid facility.
	ErrInvalidSyslogFacility = errors.New("invalid syslog facility")

	// ErrInvalidSyslogFormat represents the invalid format.
	ErrInvalidSyslogFormat = errors.New("invalid syslog format")

	// ErrFailedToLoadX509KeyPair is to used to indicate that it's failed to load x509 key pair.
	ErrFailedToLoadX509KeyPair = errors.New("fail to load x509 key pair")
)

Functions

func Init

func Init(info logger.Info) (logger.LogDriver, error)

Init return the Syslog log driver.

func ValidateSyslogOption

func ValidateSyslogOption(info logger.Info) error

ValidateSyslogOption validates the syslog config.

Types

type Formatter

type Formatter = srslog.Formatter

Formatter is alias srslog.Formatter.

type Framer

type Framer = srslog.Framer

Framer is alias srslog.Framer.

type Priority

type Priority = srslog.Priority

Priority is alias srslog.Priority.

type Syslog

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

Syslog writes the log data into syslog.

func NewSyslog

func NewSyslog(info logger.Info) (*Syslog, error)

NewSyslog returns new Syslog based on the log config.

func (*Syslog) Close

func (s *Syslog) Close() error

Close closes the Syslog.

func (*Syslog) Name

func (s *Syslog) Name() string

Name return the log driver's name.

func (*Syslog) WriteLogMessage

func (s *Syslog) WriteLogMessage(msg *logger.LogMessage) error

WriteLogMessage will write the LogMessage.

Jump to

Keyboard shortcuts

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