Adjusting logs

This commit is contained in:
Warrick Corfe-Tan 2021-10-29 16:05:53 +11:00
parent 6da08b807c
commit 9e88af06ee
1 changed files with 1 additions and 3 deletions

View File

@ -947,14 +947,12 @@ ipc.on('close-debug-log', () => {
}
});
ipc.on('save-debug-log', (event, logText) => {
console.log(logText);
const outputPath = path.join(app.getPath('desktop'), `session_debug_${new Date()}.log`);
fs.writeFile(outputPath, logText, err => {
if (err) {
console.error('Error saving debug log');
}
console.warn('Successfully saved log');
console.error(`Saved log - ${outputPath}`);
});
});