log4j:WARN No appenders could be found for logger 解决办法

Posted Sharpest

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了log4j:WARN No appenders could be found for logger 解决办法相关的知识,希望对你有一定的参考价值。

转自:https://blog.csdn.net/chw0629/article/details/80567936

使用log4j时不起作用,每次执行完出现以下提示:

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.

 

解决办法如下:

在配置文件log4j.properties(文件名必须这个,放在resources目录) 全选粘贴如下代码:

 

# Global logging configuration 开发时候建议使用 debug
log4j.rootLogger=DEBUG, stdout
# Console output...
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n

---------------------
作者:鱼儿629
来源:CSDN
原文:https://blog.csdn.net/chw0629/article/details/80567936
版权声明:本文为博主原创文章,转载请附上博文链接!











以上是关于log4j:WARN No appenders could be found for logger 解决办法的主要内容,如果未能解决你的问题,请参考以下文章

log4j:WARN No appenders 警告

解决log4j:WARN No appenders could be found for logger

log4j:WARN No appenders could be found for logger错误

log4j:WARN No appenders could be found for logger

关于控制台输出 警告 log4j:WARN No appenders could be found for logger

log4j:WARN No appenders could be found for logger