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

Method All

zaptest/observer/observer.go:51–57  ·  view source on GitHub ↗

All returns a copy of all the observed logs.

()

Source from the content-addressed store, hash-verified

49
50// All returns a copy of all the observed logs.
51func (o *ObservedLogs) All() []LoggedEntry {
52 o.mu.RLock()
53 ret := make([]LoggedEntry, len(o.logs))
54 copy(ret, o.logs)
55 o.mu.RUnlock()
56 return ret
57}
58
59// TakeAll returns a copy of all the observed logs, and truncates the observed
60// slice.

Callers 11

AllUntimedMethod · 0.95
TestRedirectStdLogCallerFunction · 0.80
TestWithClockFunction · 0.80
TestTeeCheckFunction · 0.80
TestTeeWriteFunction · 0.80
TestTeeWithFunction · 0.80
assertEmptyFunction · 0.80
TestObserverFunction · 0.80
TestObserverWithFunction · 0.80
checkMessagesFunction · 0.80

Calls

no outgoing calls

Tested by 10

TestRedirectStdLogCallerFunction · 0.64
TestWithClockFunction · 0.64
TestTeeCheckFunction · 0.64
TestTeeWriteFunction · 0.64
TestTeeWithFunction · 0.64
assertEmptyFunction · 0.64
TestObserverFunction · 0.64
TestObserverWithFunction · 0.64
checkMessagesFunction · 0.64