MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / writeLogLine

Function writeLogLine

packages/node-runtime/src/import/perf-logger.ts:91–100  ·  view source on GitHub ↗
(level: LogLevel, message: string)

Source from the content-addressed store, hash-verified

89}
90
91function 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
102export function logError(message: string, error?: Error): void {
103 errorCount++

Callers 2

logErrorFunction · 0.85
logInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected