Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestLogger ¶
type TestLogger interface { // Events returns all recorded events in the logger. Events() []logur.LogEvent }
TestLogger acts as a recorder for the Logger under test.
type TestLoggerFunc ¶
TestLoggerFunc converts an event function to a TestLogger if it's definition compatible with the interface.
func (TestLoggerFunc) Events ¶
func (fn TestLoggerFunc) Events() []logur.LogEvent
type TestSuite ¶
type TestSuite struct { LoggerFactory func(level logur.Level) (logur.Logger, TestLogger) NoTraceLevel bool }
TestSuite runs a set of conformance tests against a logger.
func (TestSuite) RunLevelContextTest ¶
RunLevelContextTest tests leveled logging capabilities of a LoggerContext. Note: this is not mandatory, incompatible loggers will be skipped.
func (TestSuite) RunLevelEnablerTest ¶
RunLevelEnablerTest tests enabled levels. Note: this is not mandatory, incompatible loggers will be skipped. nolint: gocognit
func (TestSuite) RunLevelTest ¶
RunLevelTest tests leveled logging capabilities of a Logger.
Click to show internal directories.
Click to hide internal directories.