首页 > 代码库 > log4j.properties 属性文件配置

log4j.properties 属性文件配置

log4j.rootCategory=INFO,stdout,R
#stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[BOSS] %d{yyyy-MM-dd HH\:mm\:ss,SSS} [%t] [%c] [%p] - %m%n
#File
log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.File=${catalina.home}\\logs\\boss\\boss.log
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d-[BOSS] %d{yyyy-MM-dd HH\:mm\:ss,SSS} [%t] [%c] [%p] - %m%n
#Class
log4j.logger.org.apache.commons=ERROR
log4j.logger.org.displaytag=ERROR
log4j.logger.org.springframework=INFO
log4j.logger.org.apache.velocity=FATAL
log4j.logger.org.hibernate=INFO
log4j.logger.org.hibernate.SQL=DEBUG
log4j.logger.org.zframework.core=DEBUG
log4j.logger.org.zframework.database=DEBUG
log4j.logger.org.zframework.model=DEBUG

 

log4j.properties 属性文件配置