fix(reg): 🚑 remove log except when in NODE_ENV === "test"
This commit is contained in:
parent
91d796788d
commit
f60fd1c618
1 changed files with 3 additions and 1 deletions
|
|
@ -7,7 +7,9 @@ export const logger = winston.createLogger({
|
|||
format: winston.format.json(),
|
||||
transports: [
|
||||
// Write all logs with importance level of `info` or higher to `info.log`
|
||||
new winston.transports.File({ filename: "e2e.log", level: "info" }),
|
||||
...(process.env.NODE_ENV === "test"
|
||||
? [new winston.transports.File({ filename: "e2e.log", level: "info" })]
|
||||
: []),
|
||||
// Normal console.log behavior
|
||||
new winston.transports.Console(),
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue