mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 00:13:12 +09:00
Remove migration of alpha-10 single file logs
This code is no longer functional after the master/slave rename and has served its purpose to migrate the exsting logs to the new format.
This commit is contained in:
1 parent
6fc3abafd5
commit
116eceaac4
3 files changed
-93
No files matched your search
@@ -102,20 +102,6 @@ async function startHost() {
|
||||
.argv
|
||||
;
|
||||
|
||||
{
|
||||
// Migration from alpha-10 single file logs, note that we can't use
|
||||
// the logger here as it's not initalized yet.
|
||||
/* eslint-disable no-console */
|
||||
let hostLogDirectory = path.join(args.logDirectory, "host");
|
||||
if (!await fs.pathExists(hostLogDirectory) && await fs.pathExists("host.log")) {
|
||||
console.log("Migrating host log...");
|
||||
await fs.ensureDir(hostLogDirectory);
|
||||
await libLoggingUtils.migrateLogs("host.log", hostLogDirectory, "host-%DATE%.log");
|
||||
console.log("Migration complete, you should delete host.log now");
|
||||
}
|
||||
/* eslint-enable no-console */
|
||||
}
|
||||
|
||||
logger.add(new winston.transports.DailyRotateFile({
|
||||
format: winston.format.json(),
|
||||
filename: "host-%DATE%.log",
|
||||
|
||||
Reference in new issue
Block a user