go-server-sdk: github.com/launchdarkly/go-server-sdk/shared_test Index | Files | Directories

package shared_test

import "github.com/launchdarkly/go-server-sdk/shared_test"

Index

Package Files

mock_logging.go

func NullLoggers Uses

func NullLoggers() ldlog.Loggers

NullLoggers returns a Loggers instance that suppresses all output.

type MockLogItem Uses

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

MockLogItem represents a log message captured by MockLoggers.

type MockLoggers Uses

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 Uses

func NewMockLoggers() *MockLoggers

NewMockLoggers creates a log-capturing object.

Directories

PathSynopsis
ldtestPackage ldtest contains types and functions used by SDK unit tests in multiple packages.

Package shared_test imports 4 packages (graph). Updated 2020-04-08. Refresh now. Tools for package owners.