MCPcopy
hub / github.com/keploy/keploy / dropLogger

Method dropLogger

pkg/agent/proxy/syncMock/syncMock.go:285–292  ·  view source on GitHub ↗

dropLogger returns the active logger for the drop path, falling back to the shared Nop so callers never have to nil-check and an unwired manager is still safe to report against.

()

Source from the content-addressed store, hash-verified

283// back to the shared Nop so callers never have to nil-check and an
284// unwired manager is still safe to report against.
285func (m *SyncMockManager) dropLogger() *zap.Logger {
286 m.loggerMu.RLock()
287 defer m.loggerMu.RUnlock()
288 if m.logger == nil {
289 return nopLogger
290 }
291 return m.logger
292}
293
294// sendBudget is how long sendToOutChan will wait for outChan to drain
295// before dropping the mock. 200 ms is sized conservatively: large

Callers 6

sendToOutChanMethod · 0.95
AddMockMethod · 0.95
SetMemoryPressureMethod · 0.95
ResolveRangeMethod · 0.95

Calls

no outgoing calls

Tested by 2