From f5ae671b515a588e2e54f0fecc35f246561da55d Mon Sep 17 00:00:00 2001 From: Ordis <134585663+OrdisPrime@users.noreply.github.com> Date: Fri, 7 Feb 2025 18:43:41 +0100 Subject: [PATCH] use integrated terminal instead debug console --- .vscode/launch.json | 8 +++++--- src/utils/logger.ts | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 511e8636..26899db7 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,10 +8,12 @@ "type": "node", "request": "launch", "name": "Debug and Watch", - "runtimeArgs": ["-r", "ts-node/register", "-r", "tsconfig-paths/register", "--watch-path", "src"], + "runtimeArgs": ["-r", "tsconfig-paths/register", "-r", "ts-node/register", "--watch-path", "src"], "args": ["${workspaceFolder}/src/index.ts"], - "internalConsoleOptions": "openOnSessionStart", - "console": "internalConsole" + "console": "integratedTerminal" } ] } + +//can use "console": "internalConsole" for VS Code's Debug Console. For that, forceConsole in logger.ts is needed to be true +//"internalConsoleOptions": "openOnSessionStart" can be useful then diff --git a/src/utils/logger.ts b/src/utils/logger.ts index 4a8e85f1..52000727 100644 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -58,7 +58,7 @@ const combinedLog = new transports.DailyRotateFile({ }); const consoleLog = new transports.Console({ - forceConsole: true, + forceConsole: false, format: format.combine( format.colorize(), format.timestamp({ format: "YYYY-MM-DDTHH:mm:ss:SSS" }), // uses local timezone