From e6f936da9568e873b388d5169801cb5d1cbd3b9e Mon Sep 17 00:00:00 2001 From: jejebecarte <69335633+jejebecarte@users.noreply.github.com> Date: Fri, 20 Sep 2024 14:22:15 +1000 Subject: [PATCH] fix: consola not printing traces (#224) --- src/util/log-error.ts | 2 +- src/util/write-to-json-file.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/log-error.ts b/src/util/log-error.ts index 2fba6e83..bb6c8f44 100644 --- a/src/util/log-error.ts +++ b/src/util/log-error.ts @@ -4,7 +4,7 @@ import env from '@util/env'; import bot from '..'; export default async (err: Error, message?: string) => { - logger.error(message ? message + err : err); + logger.error(err, `\n\n${message}`); if (bot.discord.isReady()) { ((await bot.discord.channels.fetch(env.ERROR_CHANNEL_ID)) as TextChannel).send( diff --git a/src/util/write-to-json-file.ts b/src/util/write-to-json-file.ts index 69e5fd91..73574393 100644 --- a/src/util/write-to-json-file.ts +++ b/src/util/write-to-json-file.ts @@ -25,7 +25,7 @@ export default ( return; } - logError(err, 'Failed to write to file: '); + logError(err, 'Failed to write to file'); const embed = new EmbedBuilder() .setColor('Red') .setTitle('Error')