Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ObserveLogs ¶
func ObserveLogs( t *testing.T, testLog *zap.SugaredLogger, ) (*zap.SugaredLogger, *observer.ObservedLogs)
ObserveLogs returns a new observable test logger and observed logs based on the specified test logger.
func RequireLastLogEntry ¶
func RequireLastLogEntry( t *testing.T, observedLogs *observer.ObservedLogs, expectedLevel zapcore.Level, expectedMessage string, expectedFieldsContaining map[string]string, )
RequireLastLogEntry tests that last log entry from the observed logs has the expected level, it's message contains the expected message and/or has fields having values that contain the expected fields values.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.