Latest.log instead of all being a timestamp
This commit is contained in:
parent
115781c92a
commit
2e6710dc34
2 changed files with 4 additions and 2 deletions
2
.github/ISSUE_TEMPLATE/bug.yml
vendored
2
.github/ISSUE_TEMPLATE/bug.yml
vendored
|
|
@ -78,7 +78,7 @@ body:
|
|||
id: output
|
||||
attributes:
|
||||
label: Console Output
|
||||
description: "Please paste the console output from the beginning till termination here. If you are using the gui open the log folder under 'Debug > Open Log Folder' in the Menu. Please copy the content of the file with the highest number here."
|
||||
description: "Please paste the console output from the beginning till termination here. If you are using the gui open the log folder under 'Debug > Open Log Folder' in the Menu. Please copy the content of latest.log here."
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
|
|
|
|||
|
|
@ -74,7 +74,9 @@ if (!process.env.TEST) {
|
|||
const logFolder = path.join(getDataDirectory(), 'logs');
|
||||
if (!fs.existsSync(logFolder))
|
||||
fs.mkdirSync(logFolder);
|
||||
return new Console(fs.createWriteStream(path.join(logFolder, `${Date.now()}.log`)));
|
||||
if (fs.existsSync(path.join(logFolder, 'latest.log')))
|
||||
fs.renameSync(path.join(logFolder, 'latest.log'), path.join(logFolder, `${Date.now()}.log`));
|
||||
return new Console(fs.createWriteStream(path.join(logFolder, `latest.log`)));
|
||||
})();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue