MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / ResetGlobalTestLogging

Function ResetGlobalTestLogging

base/util_testing.go:597–607  ·  view source on GitHub ↗

ResetGlobalTestLogging will ensure that the loggers are replaced at the end of the the test.

(t *testing.T)

Source from the content-addressed store, hash-verified

595
596// ResetGlobalTestLogging will ensure that the loggers are replaced at the end of the the test.
597func ResetGlobalTestLogging(t *testing.T) {
598 t.Cleanup(func() {
599 for _, logger := range getFileLoggers() {
600 assert.NoError(t, logger.Close())
601 }
602 ctx := TestCtx(t)
603 initializeLoggers(ctx)
604 SetUpGlobalTestLogging(ctx)
605
606 })
607}
608
609// DisableTestLogging is an alias for SetUpTestLogging(LevelNone, KeyNone)
610// This function will panic if called multiple times in the same test.

Callers 11

TestDefaultLoggingFunction · 0.92
TestAuditLoggingFieldsFunction · 0.92
TestEffectiveUserIDFunction · 0.92
TestAuditLoggingGlobalsFunction · 0.92
TestLoggingKeysFunction · 0.92
TestConfigEndpointFunction · 0.92

Calls 5

getFileLoggersFunction · 0.85
TestCtxFunction · 0.85
initializeLoggersFunction · 0.85
SetUpGlobalTestLoggingFunction · 0.85
CloseMethod · 0.65

Tested by 11

TestDefaultLoggingFunction · 0.74
TestAuditLoggingFieldsFunction · 0.74
TestEffectiveUserIDFunction · 0.74
TestAuditLoggingGlobalsFunction · 0.74
TestLoggingKeysFunction · 0.74
TestConfigEndpointFunction · 0.74