logutil

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

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

func NewTaggedLoggerWithNow(tag string, w io.Writer, now func() time.Time) *TaggedLogger

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.

Jump to

Keyboard shortcuts

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