From f2d45bacfdc936d3e76566ba6215ab3fe9eee6fc Mon Sep 17 00:00:00 2001 From: Taken Date: Sun, 12 Jan 2025 19:54:07 +0100 Subject: [PATCH] Updated logger function --- src/utils/Logger.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/utils/Logger.ts b/src/utils/Logger.ts index 83267b5..ea1ae20 100644 --- a/src/utils/Logger.ts +++ b/src/utils/Logger.ts @@ -11,10 +11,11 @@ const colors = { type Colors = keyof typeof colors const AllLogs = { - info: { m: "INFO", c: null }, - error: { m: "ERROR", c: "#ff6666" }, - warn: { m: "WARN", c: "#ffcc99" }, - debug: { m: "DEBUG", c: "#66ff66" } + info: { m: "INFO", c: "#a6e3a1" }, + warn: { m: "WARN", c: "#fab387" }, + error: { m: "ERROR", c: "#f38ba8" }, + critical: { m: "CRITICAL", c: "#ff3d3d" }, + debug: { m: "DEBUG", c: "#f9e2af" } } as const type LogType = keyof typeof AllLogs @@ -35,11 +36,7 @@ export function log(m: string, t: LogType, c?: CustomColorProps): void { const message = `${time} - [${logType}] | ${m}` if (!c) { - if (t === "info") { - console.log(message) - return - } - console.log(cc(message, logColor!)) + console.log(cc(message, logColor)) return }