Documentation ¶
Overview ¶
Package logutil includes utilities to facilitate logging.
Index ¶
- type MergeLogger
- func (l *MergeLogger) MergeError(entries ...interface{})
- func (l *MergeLogger) MergeErrorf(format string, args ...interface{})
- func (l *MergeLogger) MergeInfo(entries ...interface{})
- func (l *MergeLogger) MergeInfof(format string, args ...interface{})
- func (l *MergeLogger) MergeNotice(entries ...interface{})
- func (l *MergeLogger) MergeNoticef(format string, args ...interface{})
- func (l *MergeLogger) MergeWarning(entries ...interface{})
- func (l *MergeLogger) MergeWarningf(format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MergeLogger ¶
type MergeLogger struct { *capnslog.PackageLogger // contains filtered or unexported fields }
MergeLogger supports merge logging, which merges repeated log lines and prints summary log lines instead.
For merge logging, MergeLogger prints out the line when the line appears at the first time. MergeLogger holds the same log line printed within defaultMergePeriod, and prints out summary log line at the end of defaultMergePeriod. It stops merging when the line doesn't appear within the defaultMergePeriod.
func NewMergeLogger ¶
func NewMergeLogger(logger *capnslog.PackageLogger) *MergeLogger
func (*MergeLogger) MergeError ¶
func (l *MergeLogger) MergeError(entries ...interface{})
func (*MergeLogger) MergeErrorf ¶
func (l *MergeLogger) MergeErrorf(format string, args ...interface{})
func (*MergeLogger) MergeInfo ¶
func (l *MergeLogger) MergeInfo(entries ...interface{})
func (*MergeLogger) MergeInfof ¶
func (l *MergeLogger) MergeInfof(format string, args ...interface{})
func (*MergeLogger) MergeNotice ¶
func (l *MergeLogger) MergeNotice(entries ...interface{})
func (*MergeLogger) MergeNoticef ¶
func (l *MergeLogger) MergeNoticef(format string, args ...interface{})
func (*MergeLogger) MergeWarning ¶
func (l *MergeLogger) MergeWarning(entries ...interface{})
func (*MergeLogger) MergeWarningf ¶
func (l *MergeLogger) MergeWarningf(format string, args ...interface{})
Click to show internal directories.
Click to hide internal directories.