linux部署hsql log4j,使用Log4j XML配置文件配置Hibernate日志记录?

来自http://docs.jboss.org/hibernate/core/3.3/reference/en/html/session-configuration.html#configuration-logging

以下是记录器类别的列表:

Category                    Function

org.hibernate.SQL           Log all SQL DML statements as they are executed

org.hibernate.type          Log all JDBC parameters

org.hibernate.tool.hbm2ddl  Log all SQL DDL statements as they are executed

org.hibernate.pretty        Log the state of all entities (max 20 entities) associated with the session at flush time

org.hibernate.cache         Log all second-level cache activity

org.hibernate.transaction   Log transaction related activity

org.hibernate.jdbc          Log all JDBC resource acquisition

org.hibernate.hql.ast.AST   Log HQL and SQL ASTs during query parsing

org.hibernate.secure        Log all JAAS authorization requests

org.hibernate               Log everything (a lot of information, but very useful for troubleshooting)

格式化以粘贴到log4j XML配置文件中:

注意:大多数记录器使用DEBUG级别,但是org.hibernate.type使用TRACE。在以前的Hibernate版本中,org.hibernate.type也使用DEBUG,但是从Hibernate 3开始,您必须将级别设置为TRACE(或ALL),以便查看JDBC参数绑定日志记录。

并指定了这样的类别:

必须将其放在根元素之前。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值