日期:2014-05-18  浏览次数:20625 次

log4j.properties
我用了log.info(“abc”),不能输出到文件

------解决方案--------------------
log4j.rootLogger=info,file
log4j.logger.index=info,index
log4j.logger.admin=info,admin

log4j.appender.index =org.apache.log4j.RollingFileAppender
log4j.appender.index.File=d:/hello.log
log4j.appender.index.maxFileSize=60000KB
log4j.appender.index.maxBackupIndex=1
log4j.appender.index.layout=org.apache.log4j.PatternLayout
log4j.appender.index.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}