def enable_thread_logging(exception_callback=None):
global logged_thread_enabled, Thread<EOL>LoggedThread.exception_callback = exception_callback<EOL>Thread = threading.Thread = LoggedThread<EOL>logged_thread_enabled = True<EOL>
Monkey-patch the threading.Thread class with our own LoggedThread. Any subsequent imports of threading.Thread
will reference LoggedThread instead.