Documentation
¶
Overview ¶
Package log provides a thin wrapper around go.uber.org/zap.
Logger is a type alias for *zap.Logger, so all zap methods are available directly. Use NewDevelopment for local development (coloured, human-readable output) and zap.NewProduction for production (JSON output).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
Logger is an alias for *zap.Logger. All framework components that accept a logger expect this type.
func NewDevelopment ¶
NewDevelopment creates a development-mode logger with coloured, human-readable output and caller information. Returns an error only if zap fails to initialise (extremely rare).
func NewNopLogger ¶
func NewNopLogger() *Logger
NewNopLogger returns a no-op logger that discards all output. Use it in tests or when logging is not needed.