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

Function withSugar

common_test.go:43–45  ·  common_test.go::withSugar
(t testing.TB, e zapcore.LevelEnabler, opts []Option, f func(*SugaredLogger, *observer.ObservedLogs))

Source from the content-addressed store, hash-verified

41}
42
43func withSugar(t testing.TB, e zapcore.LevelEnabler, opts []Option, f func(*SugaredLogger, *observer.ObservedLogs)) {
44 withLogger(t, e, opts, func(logger *Logger, logs *observer.ObservedLogs) { f(logger.Sugar(), logs) })
45}
46
47func runConcurrently(goroutines, iterations int, wg *sync.WaitGroup, f func()) {
48 wg.Add(goroutines)

Callers 15

TestSugarWithFunction · 0.85
TestSugarLnLoggingFunction · 0.85
TestSugarPanicLoggingFunction · 0.85
TestSugarFatalLoggingFunction · 0.85
TestSugarAddCallerFunction · 0.85
TestSugarAddCallerFailFunction · 0.85

Calls 2

SugarMethod · 0.80
withLoggerFunction · 0.70

Tested by

no test coverage detected