2009/7/13 seldan24 <selda...@gmail.com>: > Thank you both for your input. I want to make sure I get started on > the right track. For this particular script, I should have included > that I would take the exception contents, and pass those to the > logging module. For this particular script, all exceptions are fatal > and I would want them to be. I just wanted a way to catch them and > log them prior to program termination.
The logging module has a function specifically to handle this case: try: # do something except: logging.exception("Uh oh...") The exception() method will automatically add details of the exception to the log message it creates; as per the docs, you should only call it from within an exception handler. Hope that helps, Vil. -- http://mail.python.org/mailman/listinfo/python-list