Documentation
¶
Overview ¶
Package testlogger provides test-scoped slog loggers that direct output to testing.T.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachToContext ¶
AttachToContext returns a new context with a test logger attached.
func New ¶
New delegates to NewLeveled passing debug as the minimum level.
func NewLeveled ¶
NewLeveled returns an slog.Logger that directs all output to t.Log. Log statements are printed only in case of a failed test or if go test was invoked with -v flag.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.