码迷,mamicode.com
首页 > 其他好文 > 详细

log4j配置

时间:2016-08-28 16:22:22      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:

 

log4j.rootCategory=DEBUG , R, D,stdout
# Console
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.encoding=UTF-8
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 
log4j.appender.stdout.Threshold = DEBUG 
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %-5p ~ %m%n
# R
log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.encoding=UTF-8
log4j.appender.R.File=D:/Users/workspace/log/log.log
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.Threshold = DEBUG  
log4j.appender.R.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p ~ %m  ~ %l ~ %c ~ %r%n
 
# D
log4j.appender.D=org.apache.log4j.DailyRollingFileAppender
log4j.appender.D.encoding=UTF-8
log4j.appender.D.File=D:/Users/workspace/log/error.log
log4j.appender.D.layout=org.apache.log4j.PatternLayout
log4j.appender.D.Threshold = ERROR 
log4j.appender.D.layout.ConversionPattern=%d{yyyy-MM-dd HH\:mm\:ss,SSS} %-5p ~ %m  ~ %l ~ %c ~ %r%n

 

log4j配置

标签:

原文地址:http://www.cnblogs.com/liunanjava/p/5815085.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!