From 64cf863437d0a111c56f447e80d1254cf6a36605 Mon Sep 17 00:00:00 2001 From: xeals <dev@xeal.me> Date: Thu, 27 Apr 2023 11:23:48 +1000 Subject: [PATCH] fix logging --- bot.py | 1 + calc.js | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index efaa8b9..24ff95d 100755 --- a/bot.py +++ b/bot.py @@ -78,6 +78,7 @@ class BotClient(discord.Client): calc = await self._calculate(args) await message.reply(content=calc.strip()) except Exception as e: + _log.exception("running calculation") await message.reply( content="```\n" + str(e) + "\n```", delete_after=30 ) diff --git a/calc.js b/calc.js index 87332d2..0fc66d4 100644 --- a/calc.js +++ b/calc.js @@ -121,9 +121,7 @@ function* iterate(arr) { function unwrapToken(type, token) { assert( token.tokenType.name == type, - "expected token %s, got %s", - type, - token.tokenType.name + `expected token ${type}, got ${token.tokenType.name}` ); return token.image; }