如何获取HikariCP的日志记录信息 [英] How to get logging info for HikariCP
本文介绍了如何获取HikariCP的日志记录信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用Hibernate 4.3.1,Hikari 2.3.2.
Using Hibernate 4.3.1, Hikari 2.3.2.
我已经在休眠持久性xml中配置了此
I have configured this in the hibernate persistence xml
...
<property name="hibernate.hikari.leakDetectionThreshold" value="3000" />
<property name="hibernate.hikari.poolName" value="KikariTest" />
<property name="hibernate.hikari.registerMbeans" value="true" />
这在我的log4j.properties中
And this in my log4j.properties
log4j.logger.com.zaxxer.hikari=DEBUG
log4j.additivity.com.zaxxer.hikari=false
我看不到任何记录的日志信息.有什么想法吗?
Im not seeing any logging information printed. Any ideas?
推荐答案
我花了整整一天的时间才能解决这个问题!原来,我只使用log4j库,而需要包含slf4j库.
It took me a whole day to get this right! Turns out I was using log4j libs only, whereas a needed to include the slf4j libs.
这篇关于如何获取HikariCP的日志记录信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文