testlogger

package
v1.20.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 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 ...interface{})

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