MCPcopy Index your code
hub / github.com/codehamr/codehamr / dbgEnabled

Function dbgEnabled

internal/tui/debuglog.go:81–85  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

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.
81func 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

Callers 4

NewFunction · 0.85
handleStreamMethod · 0.85
dbgWriteRequestFunction · 0.85
dbgWriteMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected