(type: string, data: any)
| 67 | } |
| 68 | |
| 69 | public async writeLog(type: string, data: any) { |
| 70 | try { |
| 71 | const logPath = path.join(this.logDir, `${this.sessionId}_${type}.log`); |
| 72 | const timestamp = this.getFormattedDateTime(); |
| 73 | const formattedData = this.formatLogContent(data); |
| 74 | const logEntry = `[${timestamp}]\n${formattedData}\n\n`; |
| 75 | |
| 76 | await fs.appendFile(logPath, '='.repeat(80) + '\n' + logEntry); |
| 77 | } catch (error) { |
| 78 | console.error('Failed to write log:', error); |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | async logInterviewConfig(industry: string, type: string, interviewLogic?: IndustryLogic, interviewType?: InterviewType) { |
| 83 | await this.writeLog('interview_config', { |
no test coverage detected