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)
| 271 | // process-scoped logger; nil clears it back to the shared Nop. |
| 272 | // Safe to call concurrently with the send path. |
| 273 | func (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 |
no outgoing calls