程序正常执行,但是没有控制台输出,在网上找了一下原因,下面这段挺好用的。
关于log4j的警告信息的处理:
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax).
log4j:WARN Please initialize the log4j system properly.
解决办法:
log4j.properties文件需要放到web-inf/class目录下面,在eclipse里面放到src目录下面,会自动拷贝到class目录下面去。
文件里面的内容如下即可:
log4j.rootLogger=WARN, Console
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=(%r ms) [%t] %-5p: %c#%M %x: %m%n
log4j.logger.com.genuitec.eclipse.sqlexplorer=DEBUG
log4j.logger.org.apache=WARN
log4j.logger.org.hibernate=WARN
分享到:
相关推荐
在Java开发过程中,如果遇到"log4j:WARN Please initialize the log4j system properly"这样的错误提示,通常意味着Log4j没有正确配置或者找不到配置文件。 首先,错误信息"log4j:WARN No appenders could be found...
log4j:WARN Please initialize the log4j system properly log4j:WARN No appenders could be found for logger org apache commons beanutils ConvertUtils 出现这个错误 在web inf classes路径下加了log4j ...
报错WARN No appenders could be found for logger 或 WARN Please initialize the log4j system properly时需要引入的包。用法可以参考https://blog.csdn.net/u010912188/article/details/79761894
log4j:WARN No appenders could be found for logger (com.mchange.v2.log.MLog). log4j:WARN Please initialize the log4j system properly.
当ssm项目出现下面的警告: log4j:WARN No appenders could be found for logger (org.apache.ibatis.logging....log4j:WARN Please initialize the log4j system properly. 将这个文件放到resources目录下,消除警告。
在提供的内容中,主要描述了一个与Log4j配置相关的常见问题:“log4j:WARN Please initialize the log4j system properly”(请正确初始化Log4j系统)。这个问题通常出现在没有正确配置Log4j的应用程序中,尤其是在...
log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception in thread "main" java.lang.NullPointerException ...
log4j:WARN Please initialize the log4j system properly. 2009-11-06 21:39:17 org.apache.catalina.core.StandardContext start 严重: Error listener Start 2009-11-06 21:39:17 org.apache.catalina.core....
log4j:WARN Please initialize the log4j system properly. 2009-8-29 14:02:12 org.apache.catalina.core.ApplicationContext log 信息: Loading Spring root WebApplicationContext 2009-8-29 14:02:25 org.apache...
Please see the actual settings later in the document for more details as to why ; we recommend these changes in PHP's behavior. ; display_errors ; Default Value: On ; Development Value: On ; ...