Why do I see a warning about "No appenders found for logger" and "Please configure log4j properly"?This occurs when the default configuration files log4j.properties and log4j.xml can not be found and the application performs no explici…
版本:spring3.1+hib4.1+struts2.1 学习项目使用此版本运行时,总是会遇到各样的错误,在这里做一下记录. 问题1:log4j相关 spring的web项目,执行时报错: 信息: Deploying web application archive SSH2.war log4j:WARN No appenders could be found for logger (com.opensymphony.xwork2.config.providers.XmlConfiguratio…
1.Logger类 通过Logger类的静态方法Logger.getRootLogger得到RootLogger.所有其他的loggers是通过静态方法Logger.getLogger来实例化并获取的.这个方法Logger.getLogger把所想要的logger的名字作为参数. Logger类的一些其它基本方法在下面列出: package org.apache.log4j; public class Logger { // Creation and retrieval methods: …
编译java或引用别的代码时出现以下警告: log4j:WARN No appenders could be found for logger (org.apache.zookeeper.ZooKeeper). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. 出现这个…