Log4j

#指定根Logger,及日志输出级别,大于等于该级别的日志将被输出( DEBUG < INFO < WARN < ERROR < FATAL ) 设为OFF可以关闭日志

log4j.rootLogger=INFO,A1,A2

#TestDirectHubExtMQ
#log4j.logger.com.travelsky.thub.linkfortih.facade.job.start.testcase.TestTIHMQ=INFO,testMQlog
#log4j.appender.testMQlog=org.apache.log4j.RollingFileAppender
#log4j.appender.testMQlog.File=E\:\\ApplicationPackage\\DirectForHubTIH\\log\\Hub_TestMQ.Log
#log4j.appender.testMQlog.DatePattern='.'yyyy-MM-dd
#log4j.appender.testMQlog.layout=org.apache.log4j.PatternLayout
#log4j.appender.testMQlog.layout.ConversionPattern=%r %d{yyyy-MM-dd HH:mm:ss} %c %p -%m%n

#指定log输出目的,这里设为输出日志到指定目录的文件DirectForHubExtPro.log中
log4j.appender.A1=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A1.DatePattern='.'yyyy-MM-dd-HH
#log4j.appender.A1.File=/home/ftp57/appcode/TravelHub/OnlineHotelHub/logs/HubExtPro.Log
#log4j.appender.A1.File=/opt/app/appcode/TravelHub/DirectForHubExtPro/logs/DirectForHubExtPro.Log
log4j.appender.A1.File=E\:\\ApplicationPackage\\DirectLinkForHubExtPro\\logs\\DirectForHubExtPro.Log

#log OnlineHotelHub_IHG
log4j.logger.com.travelsky.thub.linkforhubext.adapterlogic.ihg.core.IHGHolidexAdapter=INFO,ihglog
log4j.logger.com.travelsky.thubhotel.ihgholidex.switches.IHGRequestLogic=INFO,ihglog
log4j.logger.com.travelsky.thubhotel.ihgholidex.switches.IHGResponseLogic=INFO,ihglog

log4j.appender.ihglog=org.apache.log4j.DailyRollingFileAppender
log4j.appender.ihglog.File=E\:\\ApplicationPackage\\DirectLinkForHubExtPro\\logs\\Hub_IHG.Log
log4j.appender.ihglog.DatePattern='.'yyyy-MM-dd-HH
log4j.appender.ihglog.layout=org.apache.log4j.PatternLayout
log4j.appender.ihglog.layout.ConversionPattern=%r %d{yyyy-MM-dd HH:mm:ss} %c %p -%m%n


#指定日志信息的格式
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%r %d{yyyy-MM-dd HH:mm:ss} %c %p -%m%n

#把A2输出到控制台
log4j.appender.A2=org.apache.log4j.ConsoleAppender
log4j.appender.A2.layout=org.apache.log4j.SimpleLayout
log4j.appender.A2.layout.ConversionPattern=%r %d{yyyy-MM-dd HH:mm:ss} %c %p -%m%n

你可能感兴趣的:(log4j)