syslog

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: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DetectedRFC3164 = iota
	DetectedRFC5424 = iota
	DetectedRFC6587 = iota
	DetectedLeftLog = iota
)

Variables

This section is empty.

Functions

func DetectType

func DetectType(data []byte) (detected int)

Types

type Automatic

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

func (*Automatic) GetParser

func (f *Automatic) GetParser(line []byte) Parser

func (*Automatic) IsNewLine

func (f *Automatic) IsNewLine(data []byte) bool

type Format

type Format interface {
	GetParser([]byte) Parser
	IsNewLine(data []byte) bool
}

func GetFormat added in v1.5.5

func GetFormat(format string, parseYear bool) Format

type LogParts

type LogParts map[string]interface{}

type Parser

type Parser interface {
	Parse() error
	Dump() LogParts
	Location(*time.Location)
	NeedModifyTime() bool
}

type RFC3164

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

func (*RFC3164) GetParser

func (f *RFC3164) GetParser(line []byte) Parser

func (*RFC3164) IsNewLine

func (f *RFC3164) IsNewLine(data []byte) bool

type RFC5424

type RFC5424 struct{}

func (*RFC5424) GetParser

func (f *RFC5424) GetParser(line []byte) Parser

func (*RFC5424) IsNewLine

func (f *RFC5424) IsNewLine(data []byte) bool

type RFC6587

type RFC6587 struct{}

func (*RFC6587) GetParser

func (f *RFC6587) GetParser(line []byte) Parser

func (*RFC6587) IsNewLine

func (f *RFC6587) IsNewLine(data []byte) bool

Jump to

Keyboard shortcuts

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