#lib为appenderName1
log4j.logger.adserver=debug, lib
log4j.appender.lib=org.apache.log4j.DailyRollingFileAppender
log4j.appender.lib.File=./log/adserver.log
log4j.appender.lib.layout=org.apache.log4j.PatternLayout
log4j.appender.lib.layout.ConversionPattern=%d %-5p %F:%L %m%n
log4j.appender.lib.DatePattern=‘.‘yyyy-MM-dd-HH
log4j.logger.spero_func = DEBUG, func
log4j.appender.func=org.apache.log4j.DailyRollingFileAppender
log4j.appender.func.File=./spero_func.log
log4j.appender.func.layout=org.apache.log4j.PatternLayout
log4j.appender.func.layout.ConversionPattern=%m
log4j.appender.func.DatePattern=‘.‘yyyy-MM-dd
log4j.logger.spero_perf = DEBUG, perf
log4j.appender.perf=org.apache.log4j.DailyRollingFileAppender
log4j.appender.perf.File=./spero_perf.log
log4j.appender.perf.layout=org.apache.log4j.PatternLayout
log4j.appender.perf.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.S} %-3r %m
log4j.appender.perf.DatePattern=‘.‘yyyy-MM-dd
log4j.logger.spero_stats = DEBUG, stats
log4j.appender.stats=org.apache.log4j.DailyRollingFileAppender
log4j.appender.stats.File=./spero_stats.log
log4j.appender.stats.layout=org.apache.log4j.PatternLayout
log4j.appender.stats.layout.ConversionPattern=%m
log4j.appender.stats.DatePattern=‘.‘yyyy-MM-dd
log4j.logger.spero_self = DEBUG, self
log4j.appender.self=org.apache.log4j.DailyRollingFileAppender
log4j.appender.self.File=./spero_self.log
log4j.appender.self.layout=org.apache.log4j.PatternLayout
log4j.appender.self.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.S} %-3r %m%n
log4j.appender.self.DatePattern=‘.‘yyyy-MM-dd
原文地址:http://1038741.blog.51cto.com/1028741/1765324