MCPcopy
hub / github.com/codeaashu/claude-code / logMCPDebugImpl

Function logMCPDebugImpl

src/utils/errorLogSink.ts:200–213  ·  view source on GitHub ↗

* Implementation for logMCPDebug - writes MCP debug message to log file.

(serverName: string, message: string)

Source from the content-addressed store, hash-verified

198 * Implementation for logMCPDebug - writes MCP debug message to log file.
199 */
200function logMCPDebugImpl(serverName: string, message: string): void {
201 logForDebugging(`MCP server "${serverName}": ${message}`)
202
203 const logFile = getMCPLogsPath(serverName)
204
205 const debugInfo = {
206 debug: message,
207 timestamp: new Date().toISOString(),
208 sessionId: getSessionId(),
209 cwd: getFsImplementation().cwd(),
210 }
211
212 getLogWriter(logFile).write(debugInfo)
213}
214
215/**
216 * Initialize the error log sink.

Callers

nothing calls this directly

Calls 6

logForDebuggingFunction · 0.85
getMCPLogsPathFunction · 0.85
getSessionIdFunction · 0.85
getFsImplementationFunction · 0.85
getLogWriterFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected