logreduction

package
v1.18.6-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogReduction

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

LogReduction provides a filter for consecutive identical log messages; a message will be printed no more than once per interval. If a string of messages is interrupted by a different message, the interval timer will be reset.

func NewLogReduction

func NewLogReduction(identicalErrorDelay time.Duration) *LogReduction

NewLogReduction returns an initialized LogReduction

func (*LogReduction) ClearID

func (l *LogReduction) ClearID(parentID string)

ClearID clears out log reduction records pertaining to a particular parent (e. g. container ID)

func (*LogReduction) ShouldMessageBePrinted

func (l *LogReduction) ShouldMessageBePrinted(message string, parentID string) bool

ShouldMessageBePrinted determines whether a message should be printed based on how long ago this particular message was last printed

Jump to

Keyboard shortcuts

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