JAVA LOG
时间:2019-06-02 21:12:50
收藏:0
阅读:86
参考:https://blog.csdn.net/LCF_lxf_ldy/article/details/82558172
private static final Logger logger = LoggerFactory.getLogger(XXXServiceImpl.class); //打印异常信息 throws Throwable logger.error(throwable.getMessage(), throwable); //一般是将捕捉到的Exception对象作为日志记录的最后一个参数 (会显示具体的出错信息以及出错位置), 而且要放在{}可以格式化的参数之外,防止被{}转为e.toString()
原文:https://www.cnblogs.com/aaronRhythm/p/10964144.html
评论(0)