syslog

package
v3.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: May 25, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSyslogAdapter

func NewSyslogAdapter(route *router.Route) (router.LogAdapter, error)

NewSyslogAdapter returnas a configured syslog.Adapter

Types

type Adapter

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

Adapter streams log output to a connection in the Syslog format

func (*Adapter) Stream

func (a *Adapter) Stream(logstream chan *router.Message)

Stream sends log data to a connection

type Message

type Message struct {
	*router.Message
}

Message extends router.Message for the syslog standard

func (*Message) ContainerName

func (m *Message) ContainerName() string

ContainerName returns the message's container name

func (*Message) Hostname

func (m *Message) Hostname() string

Hostname returns the os hostname

func (*Message) Priority

func (m *Message) Priority() syslog.Priority

Priority returns a syslog.Priority based on the message source

func (*Message) Render

func (m *Message) Render(tmpl *template.Template) ([]byte, error)

Render transforms the log message using the Syslog template

func (*Message) Timestamp

func (m *Message) Timestamp() string

Timestamp returns the message's syslog formatted timestamp

Jump to

Keyboard shortcuts

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