for ident, stack in sys._current_frames().items(): logger.info(("%d" % ident) + "".join(traceback.format_list(traceback.extract_stack(stack) # 특정 쓰레드 for ident, stack in sys._current_frames().items(): if ident == t.ident: logger.info(("%d" % ident) + "".join(traceback.format_list(traceback.extract_stack(stack))))