mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 15:04:52 +09:00
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:
1 parent
7cef5528b3
commit
95b2262cc3
2 files changed
+1
-14
No files matched your search
@@ -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
|
||||
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user