MCPcopy
hub / github.com/VibiumDev/vibium / debug

Function debug

clients/javascript/src/utils/debug.ts:11–23  ·  view source on GitHub ↗
(message: string, data?: Record<string, unknown>)

Source from the content-addressed store, hash-verified

9 * Log a debug message if VIBIUM_DEBUG is enabled.
10 */
11export function debug(message: string, data?: Record<string, unknown>): void {
12 if (!isDebugEnabled) return;
13
14 const timestamp = new Date().toISOString();
15 const logObj = {
16 time: timestamp,
17 level: 'debug',
18 msg: message,
19 ...data,
20 };
21
22 console.error(JSON.stringify(logObj));
23}
24
25/**
26 * Log an info message if VIBIUM_DEBUG is enabled.

Callers 4

startFunction · 0.90
goMethod · 0.90
findMethod · 0.90
findAllMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected