We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ac04ff0 + 8d9c154 commit dd145cdCopy full SHA for dd145cd
electron/config.mjs
@@ -46,12 +46,12 @@ Object.assign(log.transports.file, {
46
return join(logsDir, `${variables.appName}.log`);
47
},
48
archiveLogFn: (file) => {
49
- // Get the current Unix timestamp
50
- const info = parse(file.toString());
+ const filePath = file.toString();
+ const info = parse(filePath);
51
const timestamp = Math.floor(Date.now() / 1000);
52
53
try {
54
- renameSync(file, join(info.dir, `${info.name}.${timestamp}.${info.ext}`));
+ renameSync(filePath, join(info.dir, `${info.name}.${timestamp}${info.ext}`));
55
} catch (e) {
56
console.warn('failed to rotate log file', e);
57
}
0 commit comments