logur: logur.dev/logur/logtesting Index | Files

package logtesting

import "logur.dev/logur/logtesting"

Index

Package Files

assertion.go suite.go

func AssertLogEventsEqual Uses

func AssertLogEventsEqual(t *testing.T, expected logur.LogEvent, actual logur.LogEvent)

AssertLogEventsEqual asserts that two LogEvents are identical.

type LoggerTestSuite Uses

type LoggerTestSuite struct {
    LoggerFactory func(level logur.Level) (logur.Logger, func() []logur.LogEvent)

    TraceFallbackToDebug bool
}

LoggerTestSuite implements a minimal set of tests that every logur compatible logger implementation must satisfy.

func (*LoggerTestSuite) Execute Uses

func (s *LoggerTestSuite) Execute(t *testing.T)

Execute executes the complete test suite.

Deprecated: use logur.dev/conformance.TestSuite.Run.

func (*LoggerTestSuite) TestLevelEnabler Uses

func (s *LoggerTestSuite) TestLevelEnabler(t *testing.T)

TestLevelEnabler tests enabled levels. Note: this is not mandatory, incompatible loggers will be skipped.

Deprecated: use logur.dev/conformance.TestSuite.RunLevelEnablerTest.

func (*LoggerTestSuite) TestLevelEnablerUnknownReturnsTrue Uses

func (s *LoggerTestSuite) TestLevelEnablerUnknownReturnsTrue(t *testing.T)

TestLevelEnablerUnknownReturnsTrue tests unknown enabled levels. Note: this is not mandatory, incompatible loggers will be skipped.

Deprecated: use logur.dev/conformance.TestSuite.RunLevelEnablerTest.

func (*LoggerTestSuite) TestLevels Uses

func (s *LoggerTestSuite) TestLevels(t *testing.T)

TestLevels tests leveled logging capabilities.

Deprecated: use logur.dev/conformance.TestSuite.RunLevelTest.

func (*LoggerTestSuite) TestLevelsContext Uses

func (s *LoggerTestSuite) TestLevelsContext(t *testing.T)

TestLevelsContext tests leveled logging capabilities of a LoggerContext instance.

Deprecated: use logur.dev/conformance.TestSuite.RunLevelContextTest.

Package logtesting imports 3 packages (graph). Updated 2020-05-15. Refresh now. Tools for package owners.