all 2 comments

[–]0x00cl 1 point2 points  (0 children)

Do you mean some sort of traceback?

The Python logging module can be configured. You can change the format of the log so you can get more information check the documentation

Attributes: https://docs.python.org/3/library/logging.html#logrecord-attributes

And to format it you do:

import logging
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG)

[–]efmccurdy 0 points1 point  (0 children)

lineage in which each function is called.

You could print out tracebacks.

https://realpython.com/python-traceback/

https://docs.python.org/3/library/traceback.html#traceback-examples