Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NullLoggers ¶
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.
Click to show internal directories.
Click to hide internal directories.