MCPcopy
hub / github.com/uber-go/zap / TestLoggerSync

Function TestLoggerSync

logger_test.go:607–612  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

605}
606
607func TestLoggerSync(t *testing.T) {
608 withLogger(t, DebugLevel, nil, func(logger *Logger, _ *observer.ObservedLogs) {
609 assert.NoError(t, logger.Sync(), "Expected syncing a test logger to succeed.")
610 assert.NoError(t, logger.Sugar().Sync(), "Expected syncing a sugared logger to succeed.")
611 })
612}
613
614func TestLoggerSyncFail(t *testing.T) {
615 noSync := &ztest.Buffer{}

Callers

nothing calls this directly

Calls 3

SugarMethod · 0.80
withLoggerFunction · 0.70
SyncMethod · 0.65

Tested by

no test coverage detected