Documentation ¶
Index ¶
- Constants
- Variables
- func FindNextSpace(buff []byte, from int, l int) (int, error)
- func IsDigit(c byte) bool
- func Parse2Digits(buff []byte, cursor *int, l int, min int, max int, e error) (int, error)
- func ParseHostname(buff []byte, cursor *int, l int) (string, error)
- func ParseVersion(buff []byte, cursor *int, l int) (int, error)
- func ShowCursorPos(buff []byte, cursor int)
- type Facility
- type LogParser
- type LogParts
- type ParserError
- type Priority
- type Severity
Constants ¶
View Source
const ( PRI_PART_START = '<' PRI_PART_END = '>' NO_VERSION = -1 )
Variables ¶
View Source
var ( ErrEOL = &ParserError{"End of log line"} ErrNoSpace = &ParserError{"No space found"} ErrPriorityNoStart = &ParserError{"No start char found for priority"} ErrPriorityEmpty = &ParserError{"Priority field empty"} ErrPriorityNoEnd = &ParserError{"No end char found for priority"} ErrPriorityTooShort = &ParserError{"Priority field too short"} ErrPriorityTooLong = &ParserError{"Priority field too long"} ErrPriorityNonDigit = &ParserError{"Non digit found in priority"} ErrVersionNotFound = &ParserError{"Can not find version"} ErrTimestampUnknownFormat = &ParserError{"Timestamp format unknown"} )
Functions ¶
func Parse2Digits ¶
func ParseVersion ¶
func ShowCursorPos ¶
Types ¶
type ParserError ¶
type ParserError struct {
ErrorString string
}
func (*ParserError) Error ¶
func (err *ParserError) Error() string
type Priority ¶
func ParsePriority ¶
Click to show internal directories.
Click to hide internal directories.