Documentation
¶
Index ¶
- func DisplayLines(extraction []Extraction)
- func DisplayTestLines(extraction []Extraction)
- type Config
- type Conversion
- type Extraction
- func Parse(logtext string, config *Config) ([]Extraction, error)
- func ParseFast(logtext string, config *Config) ([]Extraction, error)
- func ParseFile(path string, config *Config) ([]Extraction, error)
- func ParseFileTest(path string, config *Config) ([]Extraction, error)
- func ParseFiles(paths []string, config *Config) ([]Extraction, error)
- func ParseFilesTest(paths []string, config *Config) ([]Extraction, error)
- func ParseLines(lines []string, config *Config) ([]Extraction, error)
- func ParseLinesFast(lines []string, config *Config) ([]Extraction, error)
- func ParseTest(logtext string, config *Config) []Extraction
- type ExtractionDebug
- type Param
- type PatternRank
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisplayLines ¶
func DisplayLines(extraction []Extraction)
func DisplayTestLines ¶
func DisplayTestLines(extraction []Extraction)
Types ¶
type Config ¶
type Config struct { Tokens []string `json:"tokens"` Patterns []string `json:"patterns"` Dependencies map[string][]string `json:"dependencies,omitempty"` Conversions map[string]Conversion `json:"conversions,omitempty"` }
func LoadConfig ¶
type Conversion ¶
type Extraction ¶
type Extraction struct { Params map[string]Param `json:"params"` Pattern string `json:"pattern"` LineNumber int `json:"lineNumber"` Line string `json:"line"` }
func Parse ¶
func Parse(logtext string, config *Config) ([]Extraction, error)
Parse separates the log text into lines and attempts to extract tokens parameters from each line using the most appropriate pattern in the given config.
func ParseFast ¶
func ParseFast(logtext string, config *Config) ([]Extraction, error)
ParseFast is identical to Parse but run concurrently.
func ParseFile ¶
func ParseFile(path string, config *Config) ([]Extraction, error)
ParseFile reads the log text from the given file path, separates the text into lines and attempts to extract tokens parameters from each line using the most appropriate pattern in the given config.
func ParseFileTest ¶
func ParseFileTest(path string, config *Config) ([]Extraction, error)
ParseTest runs ParseFile and displays a random sample of extracted parameters along with the origin lines from the log file.
func ParseFiles ¶
func ParseFiles(paths []string, config *Config) ([]Extraction, error)
ParseFile reads the log text from each of the given file paths, separates the text into lines and attempts to extract tokens parameters from each line using the most appropriate pattern in the given config.
func ParseFilesTest ¶
func ParseFilesTest(paths []string, config *Config) ([]Extraction, error)
ParseTest runs ParseFiles and displays a random sample of extracted parameters along with the origin lines from the log files.
func ParseLines ¶
func ParseLines(lines []string, config *Config) ([]Extraction, error)
ParseLines attempts to extract tokens parameters from each line using the most appropriate pattern in the given config.
func ParseLinesFast ¶
func ParseLinesFast(lines []string, config *Config) ([]Extraction, error)
ParseLinesFast is identical to ParseLines but run concurrently.
func ParseTest ¶
func ParseTest(logtext string, config *Config) []Extraction
ParseTest runs Parse and displays a random sample of extracted parameters along with the origin lines from the log text.
type ExtractionDebug ¶
type PatternRank ¶
type PatternRank struct {
// contains filtered or unexported fields
}