Back to

package syslog

Latest Go to latest
Published: Oct 4, 2018 | License: MIT | Module:


func NewSyslogAdapter

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

NewSyslogAdapter returnas a configured syslog.Adapter

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 {

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

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier