Documentation ¶
Index ¶
Constants ¶
View Source
const ( JSONParserType string = "json" TextParserType string = "text" )
View Source
const ( FILE_KEY = "file" MESSAGE_KEY = "message" LINE_KEY = "line" LEVEL_KEY = "level" TIME_KEY = "time" )
View Source
const (
FIRST_GROUP = 1
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type JSONOption ¶
type JSONParser ¶
type JSONParser struct {
// contains filtered or unexported fields
}
func NewJSONParser ¶
func NewJSONParser(kind Type, config JSONOption) (*JSONParser, error)
type Log ¶
type ParserType ¶
type ParserType string
type TextOption ¶
type TextOption struct { LevelField string `json:"level"` MessageField string `json:"message"` AppName string `json:"app_name,omitempty"` LogName string `json:"log_name,omitempty"` TimestampField string `json:"timestamp"` FileField string `json:"file,omitempty"` LineField string `json:"line,omitempty"` }
type TextParser ¶
type TextParser struct {
// contains filtered or unexported fields
}
func NewTextParser ¶
func NewTextParser(kind Type, config TextOption) (*TextParser, error)
Click to show internal directories.
Click to hide internal directories.