Log traceback to file in debug mode.

This commit is contained in:
tecnovert
2021-12-16 10:44:10 +02:00
parent 053c263751
commit 4a7eff0118
3 changed files with 18 additions and 18 deletions

View File

@@ -204,7 +204,7 @@ def msg_thread(cls):
except Exception as e:
logging.warning('process message error %s', str(e))
if cls._sc.debug:
traceback.print_exc()
logging.error(traceback.format_exc())
if processed is False:
time.sleep(timeout)