疯狂

STANDING ON THE SHOULDERS OF GIANTS
posts - 481, comments - 486, trackbacks - 0, articles - 1
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

我的log4j

Posted on 2010-06-10 14:18 疯狂 阅读(487) 评论(0)  编辑  收藏 所属分类: java

#
# Log4J Settings for log4j 1.2.x (via jakarta-commons-logging)
#
# The five logging levels used by Log are (in order):
#
#   1. DEBUG (the least serious)
#   2. INFO
#   3. WARN
#   4. ERROR
#   5. FATAL (the most serious)


# Set root logger level to ERROR and append to stdout
log4j.rootLogger=INFO, stdout,A1,A2,A3

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=%d{yyyy/MM/dd HH:mm:ss} %5p (%c:%L) - %m%n

# OpenSymphony Stuff
log4j.logger.com.opensymphony=ERROR
log4j.logger.org.apache.struts2=ERROR
log4j.logger.com.log4j=WARN
# Spring Stuff
log4j.logger.org.springframework=WARN
log4j.logger.org.hibernate=WARN

log4j.appender.A2=org.apache.log4j.FileAppender
log4j.appender.A2.File=${log4jdir}/WEB-INF/logs/FileAppender.log
log4j.appender.A2.Append=true
log4j.appender.A2.MaxFileSize=2KB
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
log4j.appender.A2.layout.ConversionPattern=%d - %c -%-4r [%t] %-5p %c %x - %m%n

log4j.appender.A3=org.apache.log4j.RollingFileAppender
log4j.appender.A3.File=${log4jdir}/WEB-INF/logs/RollingFileAppender.log
log4j.appender.A3.MaxBackupIndex=3
log4j.appender.A3.rollingStyle=Date
log4j.appender.A2.Append=false
log4j.appender.A3.MaxFileSize=2KB
log4j.appender.A1.DatePattern='.'yyyy-MM-dd-HH-mm
log4j.appender.A3.layout=org.apache.log4j.PatternLayout
log4j.appender.A3.layout.ConversionPattern=%d - %c -%-4r [%t] %-5p %c %x - %m%n

log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A1.File=${log4jdir}\WEB-INF/logs/DailyRollingFileAppender.log
log4j.appender.A1.DatePattern='.'yyyy-MM-dd-HH-mm 
log4j.appender.A1.Append=true
log4j.appender.A1.Threshold=INFO
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d - %c -%-4r [%t] %-5p %c  - %m%n


只有注册用户登录后才能发表评论。


网站导航: