Remove log rotation

Remove log rotation as Factorio implemented its own log rotation an
eternety ago and the cluster log already contains all the log entries.
This commit is contained in:
Hornwitser committed 2021-05-15 23:22:32 +02:00
1 parent 7cef5528b3
commit 95b2262cc3
2 files changed
+1 -14

No files matched your search

+1
View File
@@ -76,6 +76,7 @@
UPS statistics is exported by the statistics exporter plugin.
- Master server now defaults to hosting on https on port 8443.
- Renamed client to slave.
- Removed rotation of factorio-current.log files.
### Breaking Changes
-14
View File
@@ -384,20 +384,6 @@ class Instance extends libLink.Link {
);
}
this.logger.verbose("Rotating old logs...");
// clean old log file to avoid crash
try {
let logPath = this.path("factorio-current.log");
let stat = await fs.stat(logPath);
if (stat.isFile()) {
let logFilename = `factorio-${Math.floor(Date.parse(stat.mtime)/1000)}.log`;
await fs.rename(logPath, this.path(logFilename));
this.logger.verbose(`Log rotated as ${logFilename}`);
}
} catch (err) {
this.logger.error(`Error rotating logs:\n${err.stack}`);
}
// eslint-disable-next-line no-use-before-define
await symlinkMods(this, "sharedMods");
}