#所有INFO级别的日志都输出到控制台
log4j.rootLogger=INFO,stdout
#所有继承com.tellhow.plan包下的类日志级别为debug,默认输出地为stdout
log4j.logger.com.tellhow.plan=DEBUG
log4j.logger.com.th.basic=DEBUG
#spring框架中info级别的日志才输出到控制台
log4j.logger.org.springframework=info
log4j.logger.net.sf.hibernate=ERROR
lof4j.logger.net.sf.hibernate.SQL=DEBUG
log4j.logger.com.opensymphony.xwork2=ERROR
log4j.logger.org.apache.struts2=ERROR
#禁止该类日志输出
log4j.logger.org.springframework.jms.listener.DefaultMessageListenerContainer=OFF
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyyMMdd HH\:mm\:ss} 级别\:%-5p [类名\:%F\:%L]--> %m%n
log4j.appender.D = org.apache.log4j.DailyRollingFileAppender
log4j.appender.D.File = ../logs/stcs.log
log4j.appender.D.Append = true
log4j.appender.D.layout = org.apache.log4j.PatternLayout
log4j.appender.D.layout.ConversionPattern = %d{yyyyMMdd HH\:mm\:ss} 级别\:%-5p [类名\:%F\:%L]--> %m%n
log4j.properties配置文件(个人收藏)
最新推荐文章于 2024-07-22 21:00:00 发布