MCPcopy Create free account
hub / github.com/JunJD/alading / writeLog

Method writeLog

src/utils/debugLogger.ts:69–80  ·  view source on GitHub ↗
(type: string, data: any)

Source from the content-addressed store, hash-verified

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', {

Callers 4

logInterviewConfigMethod · 0.95
logSystemMessageMethod · 0.95
logPhaseTransitionMethod · 0.95
SOCKETFunction · 0.80

Calls 2

getFormattedDateTimeMethod · 0.95
formatLogContentMethod · 0.95

Tested by

no test coverage detected