MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / logAnalyticsDebug

Function logAnalyticsDebug

cli/src/utils/analytics.ts:88–105  ·  view source on GitHub ↗
(message: string, data: Record<string, unknown>)

Source from the content-addressed store, hash-verified

86}
87
88function logAnalyticsDebug(message: string, data: Record<string, unknown>) {
89 if (!DEBUG_ANALYTICS) {
90 return
91 }
92 loadLogger()
93 .then(({ logger }) => {
94 logger.debug(data, message)
95 })
96 .catch((error) => {
97 try {
98 console.debug(message, data)
99 } catch {
100 // Ignore console errors in restricted environments
101 }
102 // Log the error to help diagnose logger issues in debug mode
103 console.debug('Failed to load logger for analytics:', error)
104 })
105}
106
107/** Get current distinct ID (real user ID if identified, otherwise anonymous ID) */
108function getDistinctId(): string | undefined {

Callers 2

trackEventFunction · 0.85
identifyUserFunction · 0.85

Calls 1

loadLoggerFunction · 0.85

Tested by

no test coverage detected