testlogger

package
v1.15.1-rc.3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestLogger

type TestLogger struct {
	// contains filtered or unexported fields
}

TestLogger wraps testing.NTB to add optional debug logging, without exposing the ability to error or fatally terminate the test.

func New

func New(t testing.NTB, debugEnabled bool) *TestLogger

New constructs a new TestLogger

func (*TestLogger) Debug

func (tl *TestLogger) Debug(args ...interface{})

Debug only prints the log message if debug is enabled. Use for verbose logs that can be enabled by developers, but won't show in CI.

func (*TestLogger) Debugf

func (tl *TestLogger) Debugf(format string, args ...interface{})

Debugf only prints the log message, with Sprintf-like formatting, if debug is enabled. Use for verbose logs that can be enabled by developers, but won't show in CI.

func (*TestLogger) Info

func (tl *TestLogger) Info(args ...interface{})

Info prints the message to the test log.

func (*TestLogger) Infof

func (tl *TestLogger) Infof(format string, args ...interface{})

Infof prints the message to the test log, with Sprintf-like formatting.

func (*TestLogger) IsDebugEnabled

func (tl *TestLogger) IsDebugEnabled() bool

IsDebugEnabled returns true if debug is enabled for this test

Jump to

Keyboard shortcuts

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