标签:date 查看 logger style att file color div pre
将日志的error和info分别打印输出,以便于查看
### set log levels ###
log4j.rootLogger=info,error,info
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd-HH-mm} [%t] [%c] [%p] - %m%n
log4j.logger.info=info
log4j.appender.info=com.zznode.log.MyAppender
log4j.appender.info.layout=org.apache.log4j.PatternLayout
log4j.appender.info.layout.ConversionPattern=%d{yyyy-MM-dd-HH-mm} [%t] [%c] [%p] - %m%n
log4j.appender.info.datePattern=‘.‘yyyy-MM-dd
log4j.appender.info.Threshold = INFO
log4j.appender.info.append=false
log4j.appender.info.File=D:/logs/info.log
log4j.logger.error=error
log4j.appender.error=com.zznode.log.MyAppender
log4j.appender.error.layout=org.apache.log4j.PatternLayout
log4j.appender.error.layout.ConversionPattern=%d{yyyy-MM-dd-HH-mm} [%t] [%c] [%p] - %m%n
log4j.appender.error.datePattern=‘.‘yyyy-MM-dd
log4j.appender.error.Threshold = ERROR
log4j.appender.error.append=false
log4j.appender.error.File=D:/logs/error.log
标签:date 查看 logger style att file color div pre
原文地址:http://www.cnblogs.com/PMlog/p/7672977.html