求助,怎样配置日志才会有类似hibernate的打印sql
7 回复
#-------------------------------------------
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{yyyy-MM-dd HH:mm:ss} %p [%t]{%C.%M()}: %m%n
log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.logFile.File=${catalina.home}/logs/gd_upload.log
#log4j.appender.logFile.MaxFileSize=1024MB
#log4j.appender.logFile.MaxBackupIndex=100
log4j.appender.logFile.layout=org.apache.log4j.PatternLayout
log4j.appender.logFile.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %p [%t]{%C.%M()}: %m%n
#-------------------------------------------
log4j.logger.org.apache.cxf=warn
log4j.logger.org.nutz.ioc=info
log4j.logger.org.nutz.dao=debug
log4j.logger.org.nutz.dao.impl=info
log4j.logger.org.nutz.dao.jdbc=debug
log4j.logger.org.nutz.dao.entity=info
log4j.logger.org.springframework=warn
添加回复
请先登陆