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

Method getLogFilePath

packages/node-runtime/src/ai/ai-logger.ts:70–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68 }
69
70 private getLogFilePath(): string {
71 if (this.logFile) return this.logFile
72
73 this.ensureLogDir()
74 const now = new Date()
75 const date = now.toISOString().split('T')[0]
76 const hours = String(now.getHours()).padStart(2, '0')
77 const minutes = String(now.getMinutes()).padStart(2, '0')
78 this.logFile = path.join(this.logDir, `ai_${date}_${hours}-${minutes}.log`)
79
80 return this.logFile
81 }
82
83 private getLogStream(): fs.WriteStream {
84 if (this.logStream) return this.logStream

Callers 2

getLogPathMethod · 0.95
getLogStreamMethod · 0.95

Calls 1

ensureLogDirMethod · 0.95

Tested by

no test coverage detected