MCPcopy
hub / github.com/keploy/keploy / SetLogger

Method SetLogger

pkg/agent/proxy/syncMock/syncMock.go:273–280  ·  view source on GitHub ↗

SetLogger installs a zap.Logger for drop-path reporting. Callers are expected to wire this once during proxy bootstrap with a process-scoped logger; nil clears it back to the shared Nop. Safe to call concurrently with the send path.

(l *zap.Logger)

Source from the content-addressed store, hash-verified

271// process-scoped logger; nil clears it back to the shared Nop.
272// Safe to call concurrently with the send path.
273func (m *SyncMockManager) SetLogger(l *zap.Logger) {
274 if m == nil {
275 return
276 }
277 m.loggerMu.Lock()
278 defer m.loggerMu.Unlock()
279 m.logger = l
280}
281
282// dropLogger returns the active logger for the drop path, falling
283// back to the shared Nop so callers never have to nil-check and an

Callers 5

NewFunction · 0.80

Calls

no outgoing calls