From 9da53b7cbdc234857a985c3bcfebc7c2045fd32b Mon Sep 17 00:00:00 2001 From: zim514 Date: Sat, 13 Apr 2024 10:29:28 -0400 Subject: [PATCH] Add stacktrace to rollbar --- script.service.hue/addon.xml | 2 +- script.service.hue/resources/lib/reporting.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/script.service.hue/addon.xml b/script.service.hue/addon.xml index 39038672..116c1c01 100644 --- a/script.service.hue/addon.xml +++ b/script.service.hue/addon.xml @@ -1,4 +1,4 @@ - + diff --git a/script.service.hue/resources/lib/reporting.py b/script.service.hue/resources/lib/reporting.py index 35612937..a99e2899 100644 --- a/script.service.hue/resources/lib/reporting.py +++ b/script.service.hue/resources/lib/reporting.py @@ -49,9 +49,9 @@ def _report_error(level="critical", error="", exc="", logging=False): 'platform': platform.system(), 'kodi': KODIVERSION, 'error': error, - 'exc': exc + 'exc': traceback.format_exc() } - rollbar.init(ROLLBAR_API_KEY, capture_ip=False, code_version="v" + ADDONVERSION, root=ADDONPATH, scrub_fields='bridgeUser, bridgeIP, bridge_user, bridge_ip, server.host', environment=env) + rollbar.init(ROLLBAR_API_KEY, capture_ip=False, code_version="v" + ADDONVERSION, root=ADDONPATH, scrub_fields='bridgeUser, bridgeIP, bridge_user, bridge_ip, server.host', environment=env, handler="thread") if logging: rollbar.report_message(exc, extra_data=data, level=level) else: