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

Function withTee

zapcore/tee_test.go:35–40  ·  view source on GitHub ↗
(f func(core Core, debugLogs, warnLogs *observer.ObservedLogs))

Source from the content-addressed store, hash-verified

33)
34
35func withTee(f func(core Core, debugLogs, warnLogs *observer.ObservedLogs)) {
36 debugLogger, debugLogs := observer.New(DebugLevel)
37 warnLogger, warnLogs := observer.New(WarnLevel)
38 tee := NewTee(debugLogger, warnLogger)
39 f(tee, debugLogs, warnLogs)
40}
41
42func TestTeeUnusualInput(t *testing.T) {
43 // Verify that Tee handles receiving one and no inputs correctly.

Callers 3

TestTeeCheckFunction · 0.85
TestTeeWriteFunction · 0.85
TestTeeWithFunction · 0.85

Calls 2

NewFunction · 0.92
NewTeeFunction · 0.85

Tested by

no test coverage detected