Documentation ¶
Index ¶
- Constants
- func NewSyslogAdapter(route *router.Route) (router.LogAdapter, error)
- type Adapter
- type FieldTemplates
- type Format
- type Message
- func (m *Message) ContainerName() string
- func (m *Message) ContainerNameSplitN(sep string, n int) []string
- func (m *Message) Hostname() string
- func (m *Message) Priority() syslog.Priority
- func (m *Message) Render(format Format, tmpl *FieldTemplates) ([]byte, error)
- func (m *Message) Timestamp() string
- type TCPFraming
Constants ¶
View Source
const ( // Rfc5424Format is the modern syslog protocol format. https://tools.ietf.org/html/rfc5424 Rfc5424Format Format = "rfc5424" // Rfc3164Format is the legacy BSD syslog protocol format. https://tools.ietf.org/html/rfc3164 Rfc3164Format Format = "rfc3164" // TraditionalTCPFraming is the traditional LF framing of syslog messages on the wire TraditionalTCPFraming TCPFraming = "traditional" // OctetCountedTCPFraming prepends the size of each message before the message. https://tools.ietf.org/html/rfc6587#section-3.4.1 OctetCountedTCPFraming TCPFraming = "octet-counted" )
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
type FieldTemplates ¶
type FieldTemplates struct {
// contains filtered or unexported fields
}
FieldTemplates for rendering Syslog messages
type Message ¶
Message extends router.Message for the syslog standard
func (*Message) ContainerName ¶
ContainerName returns the message's container name
func (*Message) ContainerNameSplitN ¶
ContainerNameSplitN returns the message's container name sliced at most "n" times using "sep"
type TCPFraming ¶
type TCPFraming string
TCPFraming represents the type of framing to use for syslog messages
Click to show internal directories.
Click to hide internal directories.