Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TaggedLogger ¶
type TaggedLogger struct {
// contains filtered or unexported fields
}
TaggedLogger emits log lines with timestamps followed by a stable package tag.
func NewTaggedLogger ¶
func NewTaggedLogger(tag string, w io.Writer) *TaggedLogger
NewTaggedLogger creates a tagged logger that uses the current wall clock.
func NewTaggedLoggerWithNow ¶
NewTaggedLoggerWithNow creates a tagged logger with an injected time source.
func (*TaggedLogger) Printf ¶
func (tl *TaggedLogger) Printf(format string, args ...interface{})
Printf writes a timestamped log line with the package tag after the timestamp.
Click to show internal directories.
Click to hide internal directories.