I have a multi-threading Python program, and a utility function, writeLog(message), that writes out a timestamp followed by the message. Unfortunately, the resu
writeLog(message)
threading.get_ident() works, or threading.current_thread().ident (or threading.currentThread().ident for Python < 2.6).
threading.currentThread().ident