SetSecurityPromptLogger installs a zap logger into the package-level input guard. Callers that have a logger (the CLI initializer) should set this at startup; otherwise the guard falls back to a no-op logger. Idempotent: subsequent calls overwrite the active logger and guard.
(logger *zap.Logger)
| 30 | // |
| 31 | // Idempotent: subsequent calls overwrite the active logger and guard. |
| 32 | func SetSecurityPromptLogger(logger *zap.Logger) { |
| 33 | promptInputGuardLogger = logger |
| 34 | promptInputGuard = NewInputGuard(logger) |
| 35 | } |
| 36 | |
| 37 | // activeInputGuard returns the package-level guard, lazily instantiated |
| 38 | // with the most recently configured logger (or a no-op when nothing was |
no test coverage detected