现象:启动tomcat后,控制台报
log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded).
log4j:WARN Please initialize the log4j system properly.
然后没有任何输出,但是web系统可正常访问
解决方法
adding log4.properties file to $CATALINA_HOME/common/classes
log4.properties文件
log4j.rootLogger=INFO, R log4j.appender.R=org.apache.log4j.ConsoleAppender log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} [%c]-[%p]