Function
debug
(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 | */ |
| 11 | export 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. |
Tested by
no test coverage detected