Documentation
¶
Overview ¶
Package slogtest contains the slogger for use with Go's testing package.
If imported, then all logs that go through the stdlib's default logger will go through slog.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { // IgnoreErrors causes the test logger to not fatal the test // on Fatal and not error the test on Error or Critical. IgnoreErrors bool // SkipCleanup skips adding a t.Cleanup call that prevents the logger from // logging after a test has exited. This is necessary because race // conditions exist when t.Log is called concurrently of a test exiting. Set // to true if you don't need this behavior. SkipCleanup bool }
Options represents the options for the logger returned by Make.
Click to show internal directories.
Click to hide internal directories.