I am trying to log exceptions in Python 2.5, but I cannot do this. All formatting functions do something else than I want.
I came up with this:
def logexception(type, value, traceback):
print traceback.format_exception(type, value, traceback)
sys.excepthook = logexception
but it is called with an argument when called, although, according to the docs, it should work. Does anyone know what the problem is with this, or has another insertion solution?
pythonuser
source
share