码迷,mamicode.com
首页 > 数据库 > 详细

显示SQL

时间:2017-11-23 19:48:09      阅读:395      评论:0      收藏:0      [点我收藏+]

标签:pen   ack   orm   date   put   span   tput   for   you   

在log4j中添加

<span style="font-size:12px;">log4j.rootLogger = ${log.level},Console,default,allfile
log4j.logger.com.ibatis=debug
log4j.logger.java.sql=debug
log4j.logger.com.sf.egmas.dcn.web.mapper=debug</span>

 

 

 

log4j

log4j.rootLogger=debug, stdout, R
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
# Pattern to output the caller‘s file name and line number.
#log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
# Print the date in ISO 8601 format
log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=example.log
log4j.appender.R.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
# Print only messages of level WARN or above in the package com.foo.
log4j.logger.com.foo=WARN
<span style="font-size:12px;">log4j.rootLogger = ${log.level},Console,default,allfile
log4j.logger.com.ibatis=debug
log4j.logger.java.sql=debug
log4j.logger.com.sf.egmas.dcn.web.mapper=debug</span>

 

显示SQL

标签:pen   ack   orm   date   put   span   tput   for   you   

原文地址:http://www.cnblogs.com/yy-TANG/p/7885616.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!