Log Output in DBUnit

可紊 提交于 2019-12-05 08:08:39

When using log4j add the following to your log4j.properties:

# DbUnit
log4j.logger.org.dbunit=ERROR
KevinO

After avoiding the problem for a while, I came to a solution.

import org.slf4j.Logger
import org.slf4j.LoggerFactory
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.core.util.StatusPrinter;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;


Logger logger = (Logger)LoggerFactory.getLogger("org.dbunit")
logger.setLevel(Level. ERROR);

Hopefully this lead someone to a solution to their own similar problem.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!