parser

package
v0.0.0-...-0788a51 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

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

func NewParser

func NewParser(cfg *config.Config, input io.Reader, output io.Writer) *Parser

func (*Parser) Start

func (p *Parser) Start() error

Start starts the parser, reading from the input stream and printing the log output to the output stream line by line

type Record

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

Record represents a single log line

func NewRecord

func NewRecord(decoder *logfmt.Decoder) (*Record, error)

NewRecord parses a new Record from a logfmt.Decoder

func (*Record) MatchesFilter

func (r *Record) MatchesFilter(filter map[string]string) bool

func (*Record) String

func (r *Record) String(outputFields []string, excludeFields []string) string

String returns a formatted string representation of the Record

Jump to

Keyboard shortcuts

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