Function
writeLogLine
(level: LogLevel, message: string)
Source from the content-addressed store, hash-verified
| 89 | } |
| 90 | |
| 91 | function writeLogLine(level: LogLevel, message: string): void { |
| 92 | if (!currentLogFile) return |
| 93 | |
| 94 | const logLine = `[${new Date().toISOString()}] [${level}] ${message}\n` |
| 95 | try { |
| 96 | fs.appendFileSync(currentLogFile, logLine, 'utf-8') |
| 97 | } catch { |
| 98 | // Ignore write failure |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | export function logError(message: string, error?: Error): void { |
| 103 | errorCount++ |
Tested by
no test coverage detected