`
xusaomaiss
  • 浏览: 615493 次
  • 性别: Icon_minigender_1
  • 来自: 厦门
社区版块
存档分类
最新评论

log4j:WARN Please initialize the log4j system properly 问题解决

    博客分类:
  • java
阅读更多

今天花了点时间搞定了个并不是很重要的问题

在tomcat启动的时候,出现这个警告:

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

 

转自:hi.baidu.com/robbie.../618210349289fd4c241f1447.html

分享到:
评论
1 楼 lovelimx 2010-04-20  
引用
在eclipse里面放到src目录下面,会自动拷贝到class目录下面去

多亏这句话提醒了我,不然我自己建立一个class文件夹了。谢谢

相关推荐

    log4j日志报错解决办法

    在Java开发过程中,如果遇到"log4j:WARN Please initialize the log4j system properly"这样的错误提示,通常意味着Log4j没有正确配置或者找不到配置文件。 首先,错误信息"log4j:WARN No appenders could be found...

    JAVACCC.DLL

    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 ...

    log4j-1.2.14.jar

    报错WARN No appenders could be found for logger 或 WARN Please initialize the log4j system properly时需要引入的包。用法可以参考https://blog.csdn.net/u010912188/article/details/79761894

    quartz log4j

    log4j:WARN No appenders could be found for logger (com.mchange.v2.log.MLog). log4j:WARN Please initialize the log4j system properly.

    log4j.properties

    当ssm项目出现下面的警告: log4j:WARN No appenders could be found for logger (org.apache.ibatis.logging....log4j:WARN Please initialize the log4j system properly. 将这个文件放到resources目录下,消除警告。

    log4j使用j

    在提供的内容中,主要描述了一个与Log4j配置相关的常见问题:“log4j:WARN Please initialize the log4j system properly”(请正确初始化Log4j系统)。这个问题通常出现在没有正确配置Log4j的应用程序中,尤其是在...

    hadoop-2.6.0-hadoop.dll-winutils.exe

    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  ...

    tomcat排错经典案例之404.docx

    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....

    struts2驱动包

    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...

    spring入门编程问题集锦 .doc

    2. **log4j:WARN Please initialize the log4j system properly?** 当遇到此警告时,表明系统未正确配置log4j。解决方案是将`log4j.properties`文件放入类路径(classpath)中,对于Eclipse,通常是bin目录。如果...

    php.ini-development

    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 ; ...

Global site tag (gtag.js) - Google Analytics