log

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	Enabled bool
	W       io.Writer
	// contains filtered or unexported fields
}

Logger writes verbose diagnostic messages when Enabled is true. Output goes to the configured writer (typically stderr).

Printf is safe for concurrent use: the parallel lint pipeline can reach a shared logger from many goroutines, and not every io.Writer (e.g. bytes.Buffer) is itself thread-safe. mu serializes the format + write so lines are never torn or dropped. Always use *Logger; copying a Logger value would copy the mutex.

func (*Logger) Printf

func (l *Logger) Printf(format string, args ...any)

Printf writes a formatted message to W when Enabled is true. It is a no-op when Enabled is false.

Jump to

Keyboard shortcuts

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