From 815166066f9cba4ab651d440a623bcd8eeeff456 Mon Sep 17 00:00:00 2001 From: Peter Hedenskog Date: Thu, 16 Oct 2025 12:25:43 +0200 Subject: [PATCH] Remove color coding --- src/logger.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/logger.js b/src/logger.js index 0a9fbfe..85e3908 100644 --- a/src/logger.js +++ b/src/logger.js @@ -48,11 +48,6 @@ export function configureLog(options = {}) { : '[%(date)s] %(levelname)s: [%(name)s] %(message)s'; } -const COLORS = { - red: '\u001B[31m', - reset: '\u001B[0m' -}; - const CONSOLE_METHOD_MAP = { none: 'log', critical: 'error', @@ -64,11 +59,6 @@ const CONSOLE_METHOD_MAP = { trace: 'trace' }; -const COLOR_MAP = { - critical: COLORS.red, - error: COLORS.red -}; - function pad(value) { return String(value).padStart(2, '0'); } @@ -198,11 +188,8 @@ export class Logger { .replace('%(message)s', formattedMessage); const consoleMethod = CONSOLE_METHOD_MAP[level] ?? 'log'; - const colorPrefix = COLOR_MAP[level] ?? ''; - const colorSuffix = colorPrefix ? COLORS.reset : ''; - const coloredOutput = `${colorPrefix}${finalOutput}${colorSuffix}`; + console[consoleMethod](finalOutput); - console[consoleMethod](coloredOutput); } catch (error) { console.error('Could create the log message'); console.error(`${message} with the error ${error}`);