log

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LTSVReadOpt

type LTSVReadOpt struct {
	MatchingGroups []string
	IgnorePatterns []string
	TimeFormat     string
}

type LTSVReader

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

func NewLTSVReader

func NewLTSVReader(r io.Reader, opt LTSVReadOpt) (*LTSVReader, error)

func (*LTSVReader) Parse

func (r *LTSVReader) Parse(entry *LogEntry) (*LogEntry, error)

Parse parses one line of log file into LogEntry struct For reducing memory allocation, you can pass a LogEntry to record to reuse the given one.

func (*LTSVReader) Read

func (r *LTSVReader) Read() bool

type LogEntry

type LogEntry struct {
	Req       string
	Method    string
	Uri       string
	Status    int
	Uid       string
	SetNewUid bool
	Time      time.Time
	IsIgnored bool
}

func (LogEntry) Key

func (e LogEntry) Key() string

Jump to

Keyboard shortcuts

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