I have logging function as follows.
logging.basicConfig( filename = fileName, format = \"%(levelname) -10s %(asctime)s %(message)s\", level = logging
As of Python 3.2, this can be simplified to passing the stack_info=True flag to the logging calls. However, you'll need to use one of the above answers for any earlier version.
stack_info=True