pouch: github.com/alibaba/pouch/daemon/logger/syslog Index | Files

package syslog

import "github.com/alibaba/pouch/daemon/logger/syslog"


Package Files

conn.go const.go dialer.go fmt.go syslog.go validate.go


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")

func Init Uses

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

Init return the Syslog log driver.

func ValidateSyslogOption Uses

func ValidateSyslogOption(info logger.Info) error

ValidateSyslogOption validates the syslog config.

type Formatter Uses

type Formatter = srslog.Formatter

Formatter is alias srslog.Formatter.

type Framer Uses

type Framer = srslog.Framer

Framer is alias srslog.Framer.

type Priority Uses

type Priority = srslog.Priority

Priority is alias srslog.Priority.

type Syslog Uses

type Syslog struct {
    // contains filtered or unexported fields

Syslog writes the log data into syslog.

func NewSyslog Uses

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

NewSyslog returns new Syslog based on the log config.

func (*Syslog) Close Uses

func (s *Syslog) Close() error

Close closes the Syslog.

func (*Syslog) Name Uses

func (s *Syslog) Name() string

Name return the log driver's name.

func (*Syslog) WriteLogMessage Uses

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

WriteLogMessage will write the LogMessage.

Package syslog imports 16 packages (graph) and is imported by 2 packages. Updated 2019-02-10. Refresh now. Tools for package owners.