dbgEnabled reports whether logging is on. Callers use it to skip building expensive log payloads (e.g. accumulating a round's reasoning) when the log is off. dbgWritef itself is already a no-op, but the work feeding it isn't.
()
| 79 | // expensive log payloads (e.g. accumulating a round's reasoning) when the log |
| 80 | // is off. dbgWritef itself is already a no-op, but the work feeding it isn't. |
| 81 | func dbgEnabled() bool { |
| 82 | dbgMu.Lock() |
| 83 | defer dbgMu.Unlock() |
| 84 | return dbgFile != nil |
| 85 | } |
| 86 | |
| 87 | // dbgWritef appends one timestamped record. No-op when logging is off. The |
| 88 | // timestamp carries the date too (not just the clock) so a shared log is |
no outgoing calls
no test coverage detected