XLoggerTest.java 文件源码

java
阅读 26 收藏 0 点赞 0 评论 0

项目:bartleby 作者:
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);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号