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

Function appendToLog

source code/utils/errorLogSink.ts:113–128  ·  view source on GitHub ↗
(path: string, message: object)

Source from the content-addressed store, hash-verified

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