public void testCaught() {
XLogger logger = XLoggerFactory.getXLogger("UnitTest");
long x = 5;
Throwable t = null;
try {
@SuppressWarnings("unused")
long y = x / 0;
} catch (Exception ex) {
t = ex;
logger.catching(ex);
logger.catching(XLogger.Level.DEBUG, ex);
}
verifyWithException((LoggingEvent) listAppender.list.get(0), "catching", t);
verifyWithLevelAndException((LoggingEvent) listAppender.list.get(1), XLogger.Level.DEBUG, "catching", t);
}
XLoggerTest.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:bartleby
作者:
评论列表
文章目录