testing

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Call

type Call struct {
	Sev       log.Severity
	Calldepth int
	Fields    []log.Field
	Msg       string
}

type TestRecorder

type TestRecorder struct {
	Calls   []Call
	Flushes int
}

TestRecorder is a simple test Logger that records the invocations. This is useful for testing to verify logged data is as expected

func (*TestRecorder) Flush

func (l *TestRecorder) Flush(ctx context.Context) error

func (*TestRecorder) Log

func (l *TestRecorder) Log(ctx context.Context, sev log.Severity, calldepth int, msg string)

func (*TestRecorder) Reset

func (l *TestRecorder) Reset() ([]Call, int)

Jump to

Keyboard shortcuts

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