Adding threadIDs to log output.