log4j的properties的配置

log4j.rootLogger = INFO, stdout, appmarketapi
log4j.category.org.apache.struts2=INFO
log4j.category.org.apache=INFO
log4j.category.catalia=INFO
log4j.logger.appmarketapi= INFO,appmarketapi

log4j.appender.appmarketapi=org.apache.log4j.DailyRollingFileAppender
log4j.appender.appmarketapi.File=/root/home/apiwork/log/appmarketapi.log
log4j.appender.appmarketapi.DatePattern='.'yyyy-MM-dd
log4j.appender.appmarketapi.Append=true
log4j.appender.appmarketapi.Threshold=INFO   
#log4j.appender.appmarketapi.MaxBackupIndex=1
log4j.appender.appmarketapi.layout=org.apache.log4j.PatternLayout
log4j.appender.appmarketapi.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %c %x - %m%n

log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Threshold = INFO
log4j.appender.stdout.Target = System.out
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern =%d{yyyy-MM-dd HH:mm:ss,SSS} %m%n


#log4j.appender.A0=org.apache.log4j.ConsoleAppender
#log4j.appender.A0.layout=org.apache.log4j.PatternLayout
#log4j.appender.A0.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] [%-5p] [%m] - [%l] %3x %n
 

你可能感兴趣的:(properties)