mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-21 08:03:13 +09:00
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:
1 parent
81c7d24867
commit
1c18dc3661
7 files changed
+129
-15
No files matched your search
@@ -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({
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
"semver": "catalog:",
|
||||
"set-blocking": "catalog:",
|
||||
"winston": "catalog:",
|
||||
"winston-daily-rotate-file": "catalog:",
|
||||
"yargs": "catalog:",
|
||||
"yazl": "catalog:"
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user