Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLogger ¶
func NewLogger(t *testing.T, options ...LoggerOption) *log.Logger
Logger returns a *log.Logger that outputs all results using [testing/*t.Log].
Types ¶
type ErrorStrategy ¶
type ErrorStrategy int
ErrorStrategy defines what a [Logger] should do if a message is logged at the error level.
const ( // Ignore will take no action. This is the default. Ignore ErrorStrategy = iota // Fail will mark the test as failed, but continue. Fail // FailNow will mark the test as failed and exit immediately. FailNow )
type LoggerOption ¶
type LoggerOption func(*testHandler)
func WithErrorStrategy ¶
func WithErrorStrategy(es ErrorStrategy) LoggerOption
Click to show internal directories.
Click to hide internal directories.