log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.TldConfig).
log4j:WARN Please initialize the log4j system properly.

Hibernate3.1(依赖包中有log4j.jar),没有这个log4j.properties跟spring运行不起来

所以做个备份

这个文件放在工程目录下的src根目录下

log4j.rootCategory=DEBUG,stdout,R

# Set the level to DEBUG if you want to log all SlideExceptions (some of them aren't errors)
log4j.category.org.apache.slide.common.SlideException=FATAL

########################################
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
#log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
#log4j.appender.stdout.layout.ConversionPattern=%4p [%t] %c - %m%n
log4j.appender.stdout.layout.ConversionPattern=[%t] %-5p %-20c{2} - %m %n

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=logger.log

log4j.appender.R.ImmediateFlush=true

log4j.appender.R.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=1

log4j.appender.R.layout=org.apache.log4j.PatternLayout
#log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
#log4j.appender.R.layout.ConversionPattern=%4p [%t] %c - %m%n
log4j.appender.R.layout.ConversionPattern=%d{ABSOLUTE} [%t] %-5p %-30c{3} %x - %m %n

(来源:http://www.ziki.cn/blog/archives/1155256545.html)