Documentation
¶
Overview ¶
Package log provides a minimal logger interface used by the framework.
Consumers wire in their own logger (e.g. a structured logger with secret redaction). The default is a no-op so the module is silent when no logger is supplied, which is the common case in libraries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger interface {
Debugf(format string, args ...any)
Infof(format string, args ...any)
Warnf(format string, args ...any)
Errorf(format string, args ...any)
}
Logger is the minimal logging surface the framework needs. All methods accept printf-style format strings.
type NoopLogger ¶
type NoopLogger struct{}
NoopLogger discards all log output.
func (NoopLogger) Debugf ¶
func (NoopLogger) Debugf(string, ...any)
func (NoopLogger) Errorf ¶
func (NoopLogger) Errorf(string, ...any)
func (NoopLogger) Infof ¶
func (NoopLogger) Infof(string, ...any)
func (NoopLogger) Warnf ¶
func (NoopLogger) Warnf(string, ...any)
type StderrLogger ¶
type StderrLogger struct{}
StderrLogger writes log lines to stderr via fmt.Fprintf. Useful for development; consumers in production should plug in their own logger.
func (StderrLogger) Debugf ¶
func (StderrLogger) Debugf(format string, args ...any)
func (StderrLogger) Errorf ¶
func (StderrLogger) Errorf(format string, args ...any)
func (StderrLogger) Infof ¶
func (StderrLogger) Infof(format string, args ...any)
func (StderrLogger) Warnf ¶
func (StderrLogger) Warnf(format string, args ...any)