testlogger

package
v1.21.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SlowTest  = 10 * time.Second
	SlowFlush = 5 * time.Second
)
View Source
var WriterCloser = &testLoggerWriterCloser{}

Functions

func NewTestLoggerWriter

func NewTestLoggerWriter(name string, mode log.WriterMode) log.EventWriter

NewTestLoggerWriter creates a TestLogEventWriter as a log.LoggerProvider

func PrintCurrentTest

func PrintCurrentTest(t testing.TB, skip ...int) func()

PrintCurrentTest prints the current test to os.Stdout

func Printf

func Printf(format string, args ...any)

Printf takes a format and args and prints the string to os.Stdout

Types

type TestLogEventWriter

type TestLogEventWriter struct {
	*log.EventWriterBaseImpl
}

TestLogEventWriter is a logger which will write to the testing log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL