log4j.properties
# static Level DEBUG
#staticLevelINFO
#staticLevelWARN
#staticLevelERROR
#staticLevelFATAL
#staticLevelALL
#staticLevelOFF
log4j.rootLogger=DEBUG,console,INFO,WARN,ERROR,FATAL,,
log4j.addivity.org.apache=true
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=[%d{yyyy-MM-ddHH:mm:ss.SSS}][%p][%t][%c:%L]-%m%n
log4j.appender.INFO=org.apache.log4j.DailyRollingFileAppender
log4j.appender.INFO.File=${mycom.root}/logs/mycomDailyRollingFile.log
log4j.appender.INFO.DatePattern='.'yyyy-MM-dd-HH
log4j.appender.INFO.Threshold=INFO
log4j.appender.INFO.Append=true
log4j.appender.INFO.Encoding=UTF-8
log4j.appender.INFO.MaxFileSize=1024KB
log4j.appender.INFO.layout=org.apache.log4j.PatternLayout
log4j.appender.INFO.layout.ConversionPattern=%d[%5p][%F:%L]%M:%m%n
log4j.logger.org.apache.commons.httpclient=info
log4j.logger.httpclient.wire.content=info
log4j.logger.httpclient.wire.header=info
#Patterntooutputthecaller'sfilenameandlinenumber.
#log4j.appender.stdout.layout.ConversionPattern=%-4r%-5p[%d{yyyy-MM-ddHH:mm:ss}]%m%n
#log4j.appender.INFO=org.apache.log4j.RollingFileAppender
#log4j.appender.INFO.File=${INFO.root}/logs/mycomRolling.log
#log4j.appender.INFO.MaxFileSize=1024KB
#Keeponebackupfile
log4j.appender.ERROR.MaxBackupIndex=1
log4j.appender.ERROR.layout=org.apache.log4j.PatternLayout
log4j.appender.ERROR.layout.ConversionPattern=%-4r%-5p[%d{yyyy-MM-ddHH:mm:ss}]%m%n
log4j.appender.ERROR.Threshold=ERROR
log4j.appender.ERROR=org.apache.log4j.net.SMTPAppender
log4j.appender.ERROR.SMTPHost=mail.ad.ge.com
log4j.appender.ERROR.Subject=ERRORLOG
log4j.appender.ERROR.layout=org.apache.log4j.PatternLayout
log4j.appender.ERROR.layout.ConversionPattern=%d{ABSOLUTE}%5p%c{1};%L-%m%n
log4j.appender.FATAL.layout=org.apache.log4j.PatternLayout
log4j.appender.FATAL.layout.ConversionPattern=%-4r%-5p[%d{yyyy-MM-ddHH:mm:ss}]%m%n
log4j.appender.FATAL.Threshold=FATAL
log4j.appender.FATAL=org.apache.log4j.net.SMTPAppender
log4j.appender.FATAL.SMTPHost=mail.ad.ge.com
log4j.appender.FATAL.Subject=FATALLOG
log4j.appender.FATAL.layout=org.apache.log4j.PatternLayout
log4j.appender.FATAL.layout.ConversionPattern=%d{ABSOLUTE}%5p%c{1};%L-%m%n
log4j.appender.WARN.layout=org.apache.log4j.PatternLayout
log4j.appender.WARN.layout.ConversionPattern=%-4r%-5p[%d{yyyy-MM-ddHH:mm:ss}]%m%n
log4j.appender.WARN.Threshold=WARN
log4j.appender.WARN=org.apache.log4j.net.SMTPAppender
log4j.appender.WARN.SMTPHost=mail.ad.ge.com
log4j.appender.WARN.Subject=WARNLOG
log4j.appender.WARN.layout=org.apache.log4j.PatternLayout
log4j.appender.WARN.layout.ConversionPattern=%d{ABSOLUTE}%5p%c{1};%L-%m%n
###setloglevels###
####log4j.rootLogger=DEBUG,stdout,D,E,INFO,CONSOLE
###\u8f93\u51fa\u5230\u63a7\u5236\u53f0###
#kongzhitai
####log4j.appender.stdout=org.apache.log4j.ConsoleAppender
####log4j.appender.stdout.Target=System.out
####log4j.appender.stdout.Append=true
####log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
####log4j.appender.stdout.layout.ConversionPattern=%-d{yyyy-MM-ddHH:mm:ss}[%t:%r]-[%p]%m%n
#\u8f93\u51fa\u5230\u65e5\u5fd7\u6587\u4ef6#
####log4j.appender.D=org.apache.log4j.DailyRollingFileAppender
####log4j.appender.D.File=${webapp.root}/log/debug.log
####log4j.appender.D.Append=false
####log4j.appender.D.Threshold=DEBUG
#log4j.appender.D.DatePattern='_'yyyyMMdd'.log
####log4j.appender.D.layout=org.apache.log4j.PatternLayout
####log4j.appender.D.layout.ConversionPattern=%-d{yyyy-MM-ddHH:mm:ss}[%t:%r]-[%p]%m%n
##\u4fdd\u5b58\u5f02\u5e38\u4fe1\u606f\u5230\u5355\u72ec\u6587\u4ef6###
####log4j.appender.E=org.apache.log4j.DailyRollingFileAppender
####log4j.appender.E.File=${webapp.root}/log/error.log
####log4j.appender.E.Append=true
####log4j.appender.E.Threshold=ERROR
#log4j.appender.E.DatePattern='_'yyyyMMdd'.log
####log4j.appender.E.layout=org.apache.log4j.PatternLayout
####log4j.appender.E.layout.ConversionPattern=%-d{yyyy-MM-ddHH\:mm\:ss}[%t\:%r]-[%p]%m%n