qiniu

package
v1.5.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 9 Imported by: 4

Documentation

Index

Constants

View Source
const (
	LogHeadPrefix        = "prefix"
	LogHeadDate          = "date"
	LogHeadTime          = "time"
	LogHeadReqid  string = "reqid"
	LogHeadLevel         = "level"
	LogHeadModule        = "module"
	LogHeadFile          = "file"
	LogHeadLog           = "log" //默认在最后,不能改变顺序

	LogCombinedReqidLevel = "combinedReqidLevel" //reqid和level组合,代表reqid可能有、可能没有,但是如果都有,前者被认定为一定reqid
	LogCombinedModuleFile = "combinedModuleFile" //module和file的组合,代表可能有module,可能没有,如果存在中括号开头就认为是module
)
View Source
const (
	LogFilePattern = ":\\d+:$"

	HeadPatthern = `[1-9]\d{3}\/[0-1]\d\/[0-3]\d [0-2]\d:[0-6]\d:[0-6]\d(\.\d{6})? \[`
	KeyPrefix    = "qiniulog_prefix" //qiniulog的日志前缀
)

Variables

This section is empty.

Functions

func NewParser

func NewParser(c conf.MapConf) (parser.Parser, error)

Types

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func (*Parser) GetParser

func (p *Parser) GetParser(head string) (func(string) (string, map[string]string, error), error)

func (*Parser) Name

func (p *Parser) Name() string

func (*Parser) Parse

func (p *Parser) Parse(lines []string) ([]Data, error)

func (*Parser) Type

func (p *Parser) Type() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL