shared_test

package
v5.0.0-beta.1+incompat... Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NullLoggers

func NullLoggers() ldlog.Loggers

NullLoggers returns a Loggers instance that suppresses all output.

Types

type MockLogItem

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

MockLogItem represents a log message captured by MockLoggers.

type MockLoggers

type MockLoggers struct {
	// Loggers is the ldlog.Loggers instance to be used for tests.
	Loggers ldlog.Loggers
	// Output is a map containing all of the lines logged for each level. The level prefix is removed from the text.
	Output map[ldlog.LogLevel][]string
	// AllOutput is a list of all the log output for any level in order. The level prefix is removed from the text.
	AllOutput []MockLogItem
	// contains filtered or unexported fields
}

MockLoggers provides the ability to capture log output.

func NewMockLoggers

func NewMockLoggers() *MockLoggers

NewMockLoggers creates a log-capturing object.

Directories

Path Synopsis
Package ldtest contains types and functions used by SDK unit tests in multiple packages.
Package ldtest contains types and functions used by SDK unit tests in multiple packages.

Jump to

Keyboard shortcuts

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