MCPcopy Index your code
hub / github.com/codeaashu/claude-code / log

Function log

src/utils/claudeInChrome/chromeNativeHost.ts:34–46  ·  view source on GitHub ↗
(message: string, ...args: unknown[])

Source from the content-addressed store, hash-verified

32 : undefined
33
34function log(message: string, ...args: unknown[]): void {
35 if (LOG_FILE) {
36 const timestamp = new Date().toISOString()
37 const formattedArgs = args.length > 0 ? ' ' + jsonStringify(args) : ''
38 const logLine = `[${timestamp}] [Claude Chrome Native Host] ${message}${formattedArgs}\n`
39 // Fire-and-forget: logging is best-effort and callers (including event
40 // handlers) don't await
41 void appendFile(LOG_FILE, logLine).catch(() => {
42 // Ignore file write errors
43 })
44 }
45 console.error(`[Claude Chrome Native Host] ${message}`, ...args)
46}
47/**
48 * Send a message to stdout (Chrome native messaging protocol)
49 */

Callers 9

runChromeNativeHostFunction · 0.85
startMethod · 0.85
stopMethod · 0.85
handleMessageMethod · 0.85
handleMcpClientMethod · 0.85
tryProcessMessageMethod · 0.85
runBridgeHeadlessFunction · 0.85

Calls 2

jsonStringifyFunction · 0.85
errorMethod · 0.45

Tested by

no test coverage detected