Documentation
¶
Overview ¶
Package logutils contains general logging helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ThrottledInfoLogger ¶
type ThrottledInfoLogger struct {
// contains filtered or unexported fields
}
ThrottledInfoLogger logs messages at info level throttled to some frequency.
func NewThrottledInfoLogger ¶
func NewThrottledInfoLogger(logger logging.Logger, delay time.Duration) *ThrottledInfoLogger
NewThrottledInfoLogger returns a logger that logs messages at info level no more than once every delay interval.
func (*ThrottledInfoLogger) MaybeLog ¶
func (t *ThrottledInfoLogger) MaybeLog(message string)
MaybeLog logs the given message if the last message successfully logged is older than a prespecified delay.
Click to show internal directories.
Click to hide internal directories.