如何样配置log4j ,才能将hibernate在控制台输出的sql语句,写入到日志文件中

怎么样配置log4j ,才能将hibernate在控制台输出的sql语句,写入到日志文件中
怎么样配置log4j ,才能将hibernate在控制台输出的sql语句,写入到日志文件中

------解决方案--------------------
我把我的贴给你把,你把包都加了以后,就没问题了。
#Created by JInto - www.guh-software.de
#Fri Mar 21 19:24:08 CST 2008
log4j.appender.DatabaseLogFile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.DatabaseLogFile.File=E\://Log//DatabaseLog.txt
log4j.appender.DatabaseLogFile.layout=org.apache.log4j.PatternLayout
log4j.appender.DatabaseLogFile.layout.ConversionPattern=[%t]- [%c]-(%d)%p - %m%n
log4j.appender.ProcessLogFile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.ProcessLogFile.File=E\://Log//ProcessLog.html
log4j.appender.ProcessLogFile.layout=org.apache.log4j.HTMLLayout
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.SimpleLayout
log4j.logger.DatabaseLog=debug,DatabaseLogFile
log4j.logger.ProcessLog=debug,ProcessLogFile
log4j.rootLogger=info,console