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
@@ -21,7 +21,6 @@ import crypto from "crypto";
|
||||
import yargs from "yargs";
|
||||
import util from "util";
|
||||
import winston from "winston";
|
||||
import DailyRotateFile from "winston-daily-rotate-file";
|
||||
|
||||
|
||||
// homebrew modules
|
||||
@@ -355,19 +354,17 @@ async function initialize(): Promise<InitializeParameters> {
|
||||
level: "verbose",
|
||||
levels,
|
||||
});
|
||||
clusterLogger.add(new DailyRotateFile({
|
||||
clusterLogger.add(new lib.DailyFileTransport({
|
||||
format: winston.format.json(),
|
||||
filename: "cluster-%DATE%.log",
|
||||
utc: true,
|
||||
dirname: path.join(args.logDirectory, "cluster"),
|
||||
prefix: "cluster",
|
||||
}));
|
||||
|
||||
// Log stream for the controller.
|
||||
logger.add(new DailyRotateFile({
|
||||
logger.add(new lib.DailyFileTransport({
|
||||
format: winston.format.json(),
|
||||
filename: "controller-%DATE%.log",
|
||||
utc: true,
|
||||
dirname: path.join(args.logDirectory, "controller"),
|
||||
prefix: "controller",
|
||||
}));
|
||||
logger.add(new winston.transports.Stream({
|
||||
stream: clusterLogger,
|
||||
|
||||
Reference in new issue
Block a user