CloseDebugLog flushes and closes the log. Idempotent.
()
| 45 | |
| 46 | // CloseDebugLog flushes and closes the log. Idempotent. |
| 47 | func CloseDebugLog() { |
| 48 | dbgMu.Lock() |
| 49 | defer dbgMu.Unlock() |
| 50 | if dbgFile != nil { |
| 51 | _ = dbgFile.Close() |
| 52 | dbgFile = nil |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | // redactSlash strips the /hamrpass <key> bearer token before it lands in any |
| 57 | // log. A central hook covers any future secret-bearing command from one place. |
no outgoing calls