From df17b77f7e53fa2ec15f9f1cf732a4a5cd7c424e Mon Sep 17 00:00:00 2001 From: Thierry Carrez Date: Wed, 25 Nov 2020 15:59:56 +0100 Subject: [PATCH] Log exception when bot airbag is activated To facilitate investigating airbag-prevented PTGbot crashes, log the exception stacktrace. Change-Id: I6600abc1f07f16b739c62aeb632bd5bfd9a5e3e9 --- ptgbot/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ptgbot/bot.py b/ptgbot/bot.py index 9d05cde..760e158 100644 --- a/ptgbot/bot.py +++ b/ptgbot/bot.py @@ -54,7 +54,7 @@ def make_safe(func): func(*args, **kwargs) except Exception as e: msg = "Bot airbag activated: " + str(e) - args[0].log.error(msg) + args[0].log.error(msg, exc_info=True) args[0].send(args[0].channel, msg) return inner