Documentation
¶
Overview ¶
Package logging provides a minimal, structured logging interface for modkit applications.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface {
Debug(msg string, args ...any)
Info(msg string, args ...any)
Warn(msg string, args ...any)
Error(msg string, args ...any)
With(args ...any) Logger
}
Logger is the core logging interface used throughout modkit. It provides structured logging with key-value pairs and log levels.
func NewNopLogger ¶
func NewNopLogger() Logger
NewNopLogger returns a Logger that discards all log messages. Useful for testing or when logging is not needed.
func NewSlogLogger ¶
NewSlogLogger wraps a standard library slog.Logger to implement the modkit Logger interface. Returns a NopLogger if the provided logger is nil.
Click to show internal directories.
Click to hide internal directories.