MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / logMCPDebugImpl

Function logMCPDebugImpl

source code/utils/errorLogSink.ts:202–215  ·  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

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