MCPcopy
hub / github.com/claude-code-best/claude-code / rcLog

Function rcLog

src/bridge/rcDebugLog.ts:19–34  ·  view source on GitHub ↗
(msg: string)

Source from the content-addressed store, hash-verified

17let headerWritten = false
18
19export function rcLog(msg: string): void {
20 try {
21 if (!headerWritten) {
22 ensureLogDir()
23 appendFileSync(
24 LOG_PATH,
25 `\n===== RC-DEBUG session ${new Date().toISOString()} =====\n`,
26 )
27 headerWritten = true
28 }
29 const ts = new Date().toISOString().slice(11, 23) // HH:mm:ss.SSS
30 appendFileSync(LOG_PATH, `[${ts}] ${msg}\n`)
31 } catch {
32 // best-effort — never crash the bridge
33 }
34}
35
36/** Clear the log file at session start. */
37export function rcLogClear(): void {

Callers 12

pollForWorkFunction · 0.85
doReconnectFunction · 0.85
wireTransportFunction · 0.85
heartbeatActiveWorkItemsFunction · 0.85
onSessionDoneFunction · 0.85
runBridgeLoopFunction · 0.85
handleConnectionErrorMethod · 0.85
postOnceMethod · 0.85
handleConnectionErrorMethod · 0.85
SSETransportClass · 0.85

Calls 2

ensureLogDirFunction · 0.85
appendFileSyncFunction · 0.85

Tested by

no test coverage detected