From f60fd1c6188567c67d3d8285fd6c2c5d6acc5bfa Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 6 May 2025 16:59:24 -0700 Subject: [PATCH] fix(reg): :ambulance: remove log except when in NODE_ENV === "test" --- core/util/logger.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/util/logger.ts b/core/util/logger.ts index faaa05a43..ebd21199c 100644 --- a/core/util/logger.ts +++ b/core/util/logger.ts @@ -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(), ],