logparser

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: Apache-2.0 Imports: 10 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CriDecoder

type CriDecoder struct{}

func (CriDecoder) Decode

func (d CriDecoder) Decode(src string) (string, error)

type Decoder

type Decoder interface {
	Decode(string) (string, error)
}

type DockerJsonDecoder

type DockerJsonDecoder struct{}

func (DockerJsonDecoder) Decode

func (d DockerJsonDecoder) Decode(src string) (string, error)

type DockerLogJson

type DockerLogJson struct {
	Log string
}

type Level

type Level int
const (
	LevelUnknown Level = iota
	LevelCritical
	LevelError
	LevelWarning
	LevelInfo
	LevelDebug
)

func GuessLevel

func GuessLevel(line string) Level

func LevelByPriority

func LevelByPriority(priority string) Level

func (Level) String

func (l Level) String() string

type LogCounter

type LogCounter struct {
	Level    Level
	Hash     string
	Sample   string
	Messages int
}

type LogEntry

type LogEntry struct {
	Content string
	Level   Level
}

type Message

type Message struct {
	Content string
	Level   Level
}

type MultilineCollector

type MultilineCollector struct {
	Messages chan Message
	// contains filtered or unexported fields
}

func NewMultilineCollector

func NewMultilineCollector(ctx context.Context, timeout time.Duration) *MultilineCollector

func (*MultilineCollector) Add

func (m *MultilineCollector) Add(entry LogEntry)

type Parser

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

func NewParser

func NewParser(ch <-chan LogEntry, decoder Decoder) *Parser

func (*Parser) GetCounters

func (p *Parser) GetCounters() []LogCounter

func (*Parser) Stop

func (p *Parser) Stop()

type Pattern

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

func NewPattern

func NewPattern(input string) *Pattern

func (*Pattern) Hash

func (p *Pattern) Hash() string

func (*Pattern) String

func (p *Pattern) String() string

func (*Pattern) WeakEqual

func (p *Pattern) WeakEqual(other *Pattern) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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