标签:
1. 配置在控制台显示日志信息
stdout
log4j.rootLogger=info,stdout,logfile
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n
2. 配置显示hibernate sql parameter
log4j.logger.org.hibernate.type=TRACE,debug
log4j.logger.org.hibernate.sql=TRACE,debug
3. tomcat 日志文件保存路径配置,当前路径是{tomcat_home}/bin
log4j.appender.logfile.File=../logs/teacher.log
标签:
原文地址:http://www.cnblogs.com/tangyanbo/p/4283522.html