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

Function dbgWritef

internal/tui/debuglog.go:90–99  ·  view source on GitHub ↗

dbgWritef appends one timestamped record. No-op when logging is off. The timestamp carries the date too (not just the clock) so a shared log is unambiguous across day boundaries and correlatable with other tooling.

(category, format string, args ...any)

Source from the content-addressed store, hash-verified

88// timestamp carries the date too (not just the clock) so a shared log is
89// unambiguous across day boundaries and correlatable with other tooling.
90func dbgWritef(category, format string, args ...any) {
91 dbgMu.Lock()
92 defer dbgMu.Unlock()
93 if dbgFile == nil {
94 return
95 }
96 ts := time.Now().Format("2006-01-02 15:04:05.000")
97 body := fmt.Sprintf(format, args...)
98 fmt.Fprintf(dbgFile, "[%s] %s\n%s\n\n", ts, category, body)
99}
100
101// dbgWriteSession records the active backend and context budget once at startup.
102// Behaviour differs sharply by model (different model families fail in

Callers 14

submitMethod · 0.85
applyDoneMethod · 0.85
applyErrorMethod · 0.85
finalizeTurnMethod · 0.85
handleStreamClosedMethod · 0.85
recordToolOutcomeMethod · 0.85
maybeFailureNudgeMethod · 0.85
maybeRunawayNudgeMethod · 0.85
maybeVerifyNudgeMethod · 0.85
OpenDebugLogFunction · 0.85
dbgWriteSessionFunction · 0.85
dbgWriteRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected