()
| 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 |
no test coverage detected