日期:2014-05-20  浏览次数:20841 次

帮我解释一下log4j配置文件的几行配置含义
####   Use   two   appenders,   one   to   log   to   console,   another   to   log   to   a   file
log4j.category.web=info,WEB
log4j.category.net.bingosoft.util.xsqlext=info,WEB
log4j.category.ecs.background.shell=info,   SC
log4j.category.ecs.ets.services=debug,ISSUETICKET
log4j.category.ecs.ibe.services.GetQUEUETask=debug,GetQUEUE
log4j.category.ecs.ibe.services.DoBARRTask=debug,DOBARR
log4j.category.ecs.ibe.services.ChangePsgInfoTask=debug,ChangePsgInfo
log4j.category.ecs.file.services=debug,FILE
log4j.category.ecs.util=debug,UPLOADFILE
log4j.category.ecs.background.shell=debug,SERVICELOCATOR
log4j.category.ecs.settleorder=debug,SettleOrderTask
log4j.logger.com.csair.util.payment.batch.cmb.HandlePostedParamAction=info,BATCHPAY
log4j.rootLogger=info,stdout
##   上面几行是什么意思?
####   First   appender   writes   to   console
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]   %d{yy-MM-dd   HH:mm:ss}   <%c>   --   %m%n

#Web   File   log
log4j.appender.WEB=org.apache.log4j.DailyRollingFileAppender
log4j.appender.WEB.File=e:\\ecslog\\ecs.log
log4j.appender.WEB.layout=org.apache.log4j.PatternLayout
log4j.appender.WEB.layout.ConversionPattern=%-5p   [%t]   %d{yy-MM-dd   HH:mm:ss}   <%c>   --   %m%n
log4j.appender.WEB.datePattern= '. 'yyyy-MM-dd

#NT   Event   log
log4j.appender.C=org.apache.log4j.nt.NTEventLogAppender
log4j.appender.C.Source=Log4j
#log4j.appender.C.layout=org.apache.log4j.PatternLayout
#log4j.appender.C.layout.ConversionPattern=%-4r   %-5p   [%t]   %37c   %3x   -   %m%n

#Background   Service   Container   File   log
log4j.appender.SC=org.apache.log4j.DailyRollingFileAppender
log4j.appender.SC.File=e:\\ecslog\\service.log
log4j.appender.SC.layout=org.apache.log4j.PatternLayout
log4j.appender.SC.layout.ConversionPattern=%-5p   [%t]   %d{yy-MM-dd   HH:mm:ss}   <%c>   --   %m%n
log4j.appender.SC.datePattern= '. 'yyyy-MM-dd

#Test   Service   Container   File   log
log4j.appender.SettleOrderTask=org.apache.log4j.DailyRollingFileAppender
log4j.appender.SettleOrderTask.File=e:\\ecslog\\settleOrderTask.log
log4j.appender.SettleOrderTask.layout=org.apache.log4j.PatternLayout
log4j.appender.SettleOrderTask.layout.ConversionPattern=%-5p   [%t]   %d{yy-MM-dd   HH:mm:ss}   <%c>   --   %m%n
log4j.appender.SettleOrderTask.datePattern= '. 'yyyy-MM-dd

#Issue   Ticket   Service   File   log
log4j.appender.ISSUETICKET=org.apache.log4j.DailyRollingFileAppender
log4j.appender.ISSUETICKET.File=e:\\ecslog\\issueTicketService.log
log4j.appender.ISSUETICKET.layout=org.apache.log4j.PatternLayout
log4j.appender.ISSUETICKET.layout.ConversionPattern=%-5p   [%t]   %d{yy-MM-dd   HH:mm:ss}   <%c>   --   %m%n
log4j.appender.ISSUETICKET.datePattern= '. 'yyyy-MM-dd

#BATCHPAY   Service   File   log
log4j.appender.BATCHPAY=org.apache.log4j.DailyRollingFileAppender
log4j.appender.BATCHPAY.File=e:\\ecslog\\batchpay.log
log4j.appender.BATCHPAY.layout=org.apache.log4j.PatternLayout
log4j.appender.BATCHPAY.layout.ConversionPattern=%-5p   [%t]   %d{yy-MM-dd   HH:mm:ss}   <%c>   --   %m%n