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