# Get Python error information with debug output
# logger.exception outputs a stack trace alongside the error message.
# Example
import logging
try:
1/0
except ZeroDivisionError:
logging.exception("error_log")
# Outputs
ERROR:root:error_log
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
ZeroDivisionError: integer division or modulo by zero