日期:2011-03-22 16:13:00 来源:本站整理
hibernate3学习笔记(三) hibernate日记配置文件log4j.properties[Java编程]
本文“hibernate3学习笔记(三) hibernate日记配置文件log4j.properties[Java编程]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
hibernate 采取 apach common logging 、并结合 log4j 举行日记输出和掌握.前面的简单实例中,之所以要引入log4j.properties,就是对日记输出的配置.
完好的log4j.properties文件以下所示:
1.### direct log messages to stdout ###
2.log4j.appender.stdout=org.apache.log4j.ConsoleAppender
3.log4j.appender.stdout.Target=System.out
4.log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
5.log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
6.
7.### direct messages to file hibernate.log ###
8.#log4j.appender.file=org.apache.log4j.FileAppender
9.#log4j.appender.file.File=hibernate.log
10.#log4j.appender.file.layout=org.apache.log4j.PatternLayout
11.#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
12.
13.### set log levels - for more verbose logging change 'info' to 'debug' ###
14.
15.log4j.rootLogger=warn, stdout
16.
17.#log4j.logger.org.hibernate=info
18.log4j.logger.org.hibernate=debug
19.
20.### log HQL query parser activity
21.#log4j.logger.org.hibernate.hql.ast.AST=debug
22.
23.### log just the SQL
24.#log4j.logger.org.hibernate.SQL=debug
25.
26.### log JDBC bind parameters ###
27.log4j.logger.org.hibernate.type=info 28.#log4j.logger.org.hibernate.type=debug
29.
30.### log schema export/update ###
31.log4j.logger.org.hibernate.tool.hbm2ddl=debug
32. 33.### log HQL parse trees
34.#log4j.logger.org.hibernate.hql=debug 35.
36.### log cache activity ###
37.#log4j.logger.org.hibernate.cache=debug 38. 39.### log transaction activity
40.#log4j.logger.org.hibernate.transaction=debug 41. 42.### log JDBC resource acquisition
43.#log4j.logger.org.hibernate.jdbc=debug 44. 45.### enable the following line if you want to track down connection ###
46.### leakages when using DriverManagerConnectionProvider ###
47.#log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace
以上是“hibernate3学习笔记(三) hibernate日记配置文件log4j.properties[Java编程]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |
评论内容只代表网友观点,与本站立场无关!
评论摘要(共 0 条,得分 0 分,平均 0 分)
查看完整评论