Skip to content

Commit f60fd1c

Browse files
committed
fix(reg): 🚑 remove log except when in NODE_ENV === "test"
1 parent 91d7967 commit f60fd1c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/util/logger.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ export const logger = winston.createLogger({
77
format: winston.format.json(),
88
transports: [
99
// Write all logs with importance level of `info` or higher to `info.log`
10-
new winston.transports.File({ filename: "e2e.log", level: "info" }),
10+
...(process.env.NODE_ENV === "test"
11+
? [new winston.transports.File({ filename: "e2e.log", level: "info" })]
12+
: []),
1113
// Normal console.log behavior
1214
new winston.transports.Console(),
1315
],

0 commit comments

Comments
 (0)