第一种方法使用logging模块
第二种方法使用traceback模块
本文来自博客园,作者:I'm_江河湖海,转载请注明原文链接:https://www.cnblogs.com/jhhh/p/16764213.html