log4j分模块日志

log4j.rootLogger=INFO, stdout


log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[HOTEL] [%d] %t %c %-5p - %m%n

log4j.logger.com.ics.place=INFO,moduleA

log4j.appender.moduleA=org.apache.log4j.DailyRollingFileAppender  
log4j.appender.moduleA.File=src\\log\\moduleA.log
log4j.appender.moduleA.layout=org.apache.log4j.PatternLayout
log4j.appender.moduleA.layout.ConversionPattern=[HOTEL] [%d] %t %c %-5p - %m%n

log4j.logger.com.ics.route=INFO,moduleB

log4j.appender.moduleB=org.apache.log4j.DailyRollingFileAppender  
log4j.appender.moduleB.File=src\\log\\moduleB.log
log4j.appender.moduleB.layout=org.apache.log4j.PatternLayout
log4j.appender.moduleB.layout.ConversionPattern=[HOTEL] [%d] %t %c %-5p - %m%n

你可能感兴趣的:(log4j)