From b8efdefbcda9da2d775fa5ce2b98b196527619fa Mon Sep 17 00:00:00 2001 From: Artem Tarasov Date: Wed, 24 Aug 2022 13:35:57 +0300 Subject: [PATCH] Web: Doceditor: fixed variable name for getting path to logs from environment --- packages/editor/src/server/lib/logger.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/editor/src/server/lib/logger.js b/packages/editor/src/server/lib/logger.js index 062d11f2eb..4aabab024e 100644 --- a/packages/editor/src/server/lib/logger.js +++ b/packages/editor/src/server/lib/logger.js @@ -3,18 +3,16 @@ import "winston-daily-rotate-file"; import path from "path"; import fs from "fs"; -let logpath = process.env.logpath || null; +let logPath = process.env.logPath || null; -if (logpath != null) { - if (!path.isAbsolute(logpath)) { - logpath = path.join(__dirname, "..", logpath); +if (logPath != null) { + if (!path.isAbsolute(logPath)) { + logPath = path.join(__dirname, "..", logPath); } } -const fileName = IS_DEVELOPMENT - ? path.join(__dirname, "..", "..", "..", "Logs", "editor.%DATE%.log") - : logpath - ? path.join(logpath, "editor.%DATE%.log") +const fileName = logPath + ? path.join(logPath, "editor.%DATE%.log") : path.join(__dirname, "..", "..", "..", "Logs", "editor.%DATE%.log"); const dirName = path.dirname(fileName);