filters

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All(entry *domain.Entry) bool

Filters all entries, no matter its attributes

func And

func And(filterA func(entry *domain.Entry) bool, filterB func(entry *domain.Entry) bool) func(entry *domain.Entry) bool

Returns a new filter that uses the "&&" operation against the two given filters

func Category

func Category(entry *domain.Entry) []string

Extracts the category of a log entry

func Contains

func Contains(value string, extractor func(entry *domain.Entry) []string) func(entry *domain.Entry) bool

Checks if the extracted value contains the given one

func Equals

func Equals(value string, extractor func(entry *domain.Entry) []string) func(entry *domain.Entry) bool

Checks if the extracted value equals the given one

func Exception

func Exception(entry *domain.Entry) []string

Extracts the exceptions of a log entry

func Filter

func Filter(in <-chan *domain.Entry, out chan<- *domain.Entry, filter func(entry *domain.Entry) bool, max int64)

Runs the filter function using entries from the "in" channel and passes the filtered entries to the "out" channel until the number of filtered entries reaches the given "max" number.

func Level

func Level(entry *domain.Entry) []string

Extracts the level of a log entry

func Matches

func Matches(expression string, extractor func(entry *domain.Entry) []string) func(entry *domain.Entry) bool

Checks if the extracted value matches the given regular expression

func Message

func Message(entry *domain.Entry) []string

Extracts the message of a log entry

func Negate

func Negate(filter func(entry *domain.Entry) bool) func(entry *domain.Entry) bool

Returns a new filter that returns the opposite of the given filter

func Or

func Or(filterA func(entry *domain.Entry) bool, filterB func(entry *domain.Entry) bool) func(entry *domain.Entry) bool

Returns a new filter that uses the "||" operation against the two given filters

func Origin

func Origin(entry *domain.Entry) []string

Extracts the origin of a log entry

func Stacktrace

func Stacktrace(entry *domain.Entry) []string

Extracts the stacktrace of a log entry

func Time added in v0.8.0

func Time(entry *domain.Entry) []string

Extracts the time of a log entry

Types

type EntryFilter

type EntryFilter func(entry *domain.Entry) bool

Defines a filter capable of selecting log entries to be processed

type Extractor

type Extractor func(entry *domain.Entry) []string

Defines an extractor of values to be used by the filter

type Operation

type Operation func(value string, extractor func(entry *domain.Entry) []string) func(entry *domain.Entry) bool

Defines the operation that will be used by the filter The operation will be used against the extracted values

Jump to

Keyboard shortcuts

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