本文主要是介绍log4j:WARN No appenders could be found for logger (org.apache.ibatis.logging.LogFactory),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
**log4j:WARN No appenders could be found for logger (org.apache.ibatis.logging.LogFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.**
参见:stackoverflow
Just to get you going you have two simple approaches you can take.
First one is to just add this line to your main method:
BasicConfigurator.configure();
Second approach is to add this standard log4j.properties (taken from the above mentioned guide) file to your classpath:
log4j.rootLogger=DEBUG, A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
这篇关于log4j:WARN No appenders could be found for logger (org.apache.ibatis.logging.LogFactory)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!