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

Function appendToLog

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

Source from the content-addressed store, hash-verified

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