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

Function appendToLog

src/utils/errorLogSink.ts:111–126  ·  view source on GitHub ↗
(path: string, message: object)

Source from the content-addressed store, hash-verified

109}
110
111function appendToLog(path: string, message: object): void {
112 if (process.env.USER_TYPE !== 'ant') {
113 return
114 }
115
116 const messageWithTimestamp = {
117 timestamp: new Date().toISOString(),
118 ...message,
119 cwd: getFsImplementation().cwd(),
120 userType: process.env.USER_TYPE,
121 sessionId: getSessionId(),
122 version: MACRO.VERSION,
123 }
124
125 getLogWriter(path).write(messageWithTimestamp)
126}
127
128function extractServerMessage(data: unknown): string | undefined {
129 if (typeof data === 'string') {

Callers 1

logErrorImplFunction · 0.85

Calls 4

getFsImplementationFunction · 0.85
getSessionIdFunction · 0.85
getLogWriterFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected