执行测试遇到log4j 没有找到日志appenders

log4j:WARN No appenders could be found for logger (com.sshtools.j2ssh.transport.publickey.SshKeyPairFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Process exitValue: 0
Process exitValue: 0

 

需要在代码里面使用语句加载log4j配置文件

DOMConfigurator.configure("conf/log4j.xml");

posted @ 2016-12-29 10:58  testway  阅读(547)  评论(0编辑  收藏  举报