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

Function logMCPDebugImpl

src/utils/errorLogSink.ts:204–217  ·  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

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

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected