Merge pull request #1234 from bbassie/chore/inline-daily-rotate

Replace winston-daily-rotate-file with an in-repo transport
This commit is contained in:
Bastiaan authored and GitHub committed 2026-11-20 20:54:42 +00:00
1 parent 81c7d24867
commit 1c18dc3661
7 files changed
+129 -15

No files matched your search

+2 -4
View File
@@ -17,7 +17,6 @@ import path from "path";
import yargs from "yargs";
import packageConfig from "@clusterio/host/package.json" with { type: "json" };
import winston from "winston";
import "winston-daily-rotate-file";
// internal libraries
// Reduce startup time by lazy compiling schemas.
@@ -147,11 +146,10 @@ async function startHost() {
.parseSync()
;
logger.add(new winston.transports.DailyRotateFile({
logger.add(new lib.DailyFileTransport({
format: winston.format.json(),
filename: "host-%DATE%.log",
utc: true,
dirname: path.join(args.logDirectory, "host"),
prefix: "host",
}));
if (args.logLevel !== "none") {
logger.add(new ConsoleTransport({