Documentation
¶
Index ¶
Constants ¶
View Source
const L15Error = "L15: Error displaying log lines. Please try again."
L15Error is the message returned with an L15 error
View Source
const SyslogTimeFormat = "2006-01-02T15:04:05.999999-07:00"
SyslogTimeFormat defines the exact time format used in our logs.
Variables ¶
View Source
var ErrBadFrame = errors.New("bad frame")
ErrBadFrame is returned when the scanner cannot parse syslog message boundaries
View Source
var ErrInvalidMessage = errors.New("invalid message")
ErrInvalidMessage returned when trying to encode an invalid syslog message
Functions ¶
Types ¶
type Encoder ¶
Encoder abstracts away how messages are written out
type Message ¶
type Message struct {
Priority uint8
Version uint16
Timestamp time.Time
Hostname string
Application string
Process string
ID string
Message string
RFCCompliant bool
}
Message is a syslog message
type Scanner ¶
Scanner is the general purpose primitive for parsing message bodies coming from log-shuttle, logfwd, logplex and all sorts of logging components.
func NewDrainScanner ¶
func NewDrainScanner(r io.ReadCloser) Scanner
NewDrainScanner returns a scanner for use with drain endpoints. The primary difference is that it's lose and doesn't check for structured data.
func NewScanner ¶
NewScanner is a syslog octet frame stream parser
Click to show internal directories.
Click to hide internal directories.