logfilter

package
v1.2.11 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition func(log models.Log) bool

func And

func And(conditions ...Condition) Condition

func CategoryContains

func CategoryContains(substr string) Condition

func DayOfWeekIn

func DayOfWeekIn(days ...time.Weekday) Condition

func HourOfDayAfter

func HourOfDayAfter(min int) Condition

func HourOfDayBefore

func HourOfDayBefore(max int) Condition

func HourOfDayBetween

func HourOfDayBetween(min, max int) Condition

func HourOfDayIn

func HourOfDayIn(hours ...int) Condition

func IsCategory

func IsCategory(category string) Condition

func IsModel

func IsModel(model models.Model) Condition

func IsSeverity

func IsSeverity(severity models.Severity) Condition

func IsSeverityAtLeast

func IsSeverityAtLeast(severity models.Severity) Condition

func IsSeverityAtMost

func IsSeverityAtMost(severity models.Severity) Condition

func IsSeverityBetween

func IsSeverityBetween(min models.Severity, max models.Severity) Condition

func IsSeverityIn

func IsSeverityIn(severities ...models.Severity) Condition

func MessageContains

func MessageContains(substr string) Condition

func ModelContains

func ModelContains(substr string) Condition

func Not

func Not(condition Condition) Condition

func Or

func Or(conditions ...Condition) Condition

func TimeAfter

func TimeAfter(min time.Time) Condition

func TimeBefore

func TimeBefore(max time.Time) Condition

func TimeBetween

func TimeBetween(min, max time.Time) Condition

type Filter

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

func NewFilter

func NewFilter(conditions ...Condition) Filter

func (*Filter) Evaluate

func (f *Filter) Evaluate(log models.Log) bool

Jump to

Keyboard shortcuts

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