Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct {
Level string
Grep *regexp.Regexp
Since time.Time
Until time.Time
ErrorOnly bool
// Service, when non-empty, shows only entries from this source (e.g. "redis", "postgres").
Service string
// LevelExact: when true, Level filter shows only that level; when false (e.g. CLI --level), Level is minimum (level and above).
LevelExact bool
// Fields holds key=value pairs that must all match parsed log fields.
// e.g. {"user_id": "42", "status": "500"}
Fields map[string]string
// Sample, when > 1, passes only every Nth matching entry.
// The counter is internal — callers use Match() normally.
Sample int
// contains filtered or unexported fields
}
Filter holds the current filtering criteria.
func (*Filter) Match ¶
Match returns true if the entry passes all active filters. For sampling it maintains an internal counter; the counter only advances when all other criteria pass, so every Nth *qualifying* line is emitted rather than every Nth raw line.
func (*Filter) ToggleErrorOnly ¶
func (f *Filter) ToggleErrorOnly()
ToggleErrorOnly flips the errors-only mode on/off.
Click to show internal directories.
Click to hide internal directories.