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

Function logEventAsync

src/services/analytics/index.ts:154–164  ·  view source on GitHub ↗
(
  eventName: string,
  // intentionally no strings, to avoid accidentally logging code/filepaths
  metadata: LogEventMetadata,
)

Source from the content-addressed store, hash-verified

152 * If no sink is attached, events are queued and drained when the sink attaches.
153 */
154export async function logEventAsync(
155 eventName: string,
156 // intentionally no strings, to avoid accidentally logging code/filepaths
157 metadata: LogEventMetadata,
158): Promise<void> {
159 if (sink === null) {
160 eventQueue.push({ eventName, metadata, async: true })
161 return
162 }
163 await sink.logEventAsync(eventName, metadata)
164}
165
166/**
167 * Reset analytics state for testing purposes only.

Callers 1

bridgeMainFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected