log4j针对某个类输出到一个日志做…

log4j.logger.com.zjs.bh.utils.PubLogUtils=INFO,PubLog
log4j.appender.PubLog=org.apache.log4j.RollingFileAppender
log4j.appender.PubLog.layout=org.apache.log4j.PatternLayout
log4j.appender.PubLog.layout.ConversionPattern=%m %x %n
log4j.appender.PubLog.Append = true 
log4j.appender.PubLog.Threshold = info
log4j.appender.PubLog.MaxFileSize = 10KB
log4j.appender.PubLog.MaxBackupIndex = 1000
log4j.appender.PubLog.File =d:/logs/PubLog.log

com.zjs.bh.utils.PubLogUtils :就是对应的需要的类
 

你可能感兴趣的:(JavaEE)