### direct log messages to stdout ###log4j.appender.stdout=org.apache.log4j.ConsoleAppenderlog4j.appender.stdout.Target=System.outlog4j.appender.stdout.layout=org.apache.log4j.PatternLayoutlog4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n### direct messages to file hibernate.log ####log4j.appender.file=org.apache.log4j.FileAppender#log4j.appender.file.File=hibernate.log#log4j.appender.file.layout=org.apache.log4j.PatternLayout#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n### set log levels - for more verbose logging change 'info' to 'debug' ###log4j.rootLogger=warn, stdout#log4j.logger.org.hibernate=info#log4j.logger.org.hibernate=debug### log HQL query parser activity#log4j.logger.org.hibernate.hql.ast.AST=debug### log just the SQL#log4j.logger.org.hibernate.SQL=debug### log JDBC bind parameters ####log4j.logger.org.hibernate.type=info#log4j.logger.org.hibernate.type=debuglog4j.logger.org.hibernate.type.descriptor.sql.BasicBinder=TRACE### log schema export/update ###log4j.logger.org.hibernate.tool.hbm2ddl=debug### log HQL parse trees#log4j.logger.org.hibernate.hql=debug### log cache activity ####log4j.logger.org.hibernate.cache=debug### log transaction activity#log4j.logger.org.hibernate.transaction=debug### log JDBC resource acquisition#log4j.logger.org.hibernate.jdbc=debug### enable the following line if you want to track down connection ###### leakages when using DriverManagerConnectionProvider ####log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace
详细解决方案
Hibernate配备Log4J显示SQL参数
热度:50 发布时间:2016-05-05 12:18:40.0
相关解决方案
- hibernate 存入数据库当前时间
- hibernate DAO中加了局物,未提交
- hibernate 字段lazy 的兑现原理
- Hibernate 的query.list()的有关问题
- Hibernate 关联表字段赋值有关问题
- hibernate 联接mysql出错
- struts2 hibernate 分页有关问题
- hibernate与此同时使用多数据源?spring+hibernate
- hibernate 保留对象时,根据映射文件,无法获取主键值
- hibernate 多对1关联配置有关问题
- hibernate 一对1 ,插入不进去数据
- struts+spring+hibernate 开发,在action层调用service层接口,结果替null 注入失败,需高手帮忙
- SSH框架导入struts,hibernate,spring分先后顺序吗>>解决方法
- 请教小弟我不使用Myeclipse,可以在tomcat里面整合Spring,Hibernate,Struts2吗
- Hibernate 保存数据有关问题本人初学者
- hibernate 用hql怎么实现子查询
- struts hibernate,该如何处理
- hibernate hql "=:"符号?解决思路
- log4j 一个线程记录一个日志怎么配置
- null id in com.bsw.gms.hibernate.pojo.Score entry (don't flush the Session after an exception occurs,该怎么解决
- Hibernate flush机制的了解
- 求 Hibernate 3.32 API 汉语言文档
- 求1 struts 2+hibernate+spring整合好的项目
- ,Struts2+Hibernate+Spring做一个网站
- hibernate Save 指定值为函数有关问题(ORACEL库)
- 疯了,log4j,用的slf的api和转换适配器解决办法
- hibernate Query.createQuery(queryString).list();查询最大只有1000条数据,该怎么处理
- hibernate 联合主键自增有关问题
- log4j 不能生成日志信息解决方案
- 哪位高手能推荐下开源的购物网站源码(struts+hibernate+spring)