How to: Enable extra logging in HikariCP for Deploy

Question

How to enable extra logging in HikariCP library?

Answer

Enabling additional Hikari logging can assist in diagnosing issues concerning connection pools. The following step will create separate logging around pool connection activity and database transactions.

Steps to Follow

Add the following logger in <Deploy_Home>/conf/logback.xml file (all nodes).

<appender name="HIKARICP" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>log/hikaricp.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>log/hikaricp.%d{yyyy-MM-dd}.zip</FileNamePattern>
<maxHistory>90</maxHistory>
<totalSizeCap>100MB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%logger{36}] %msg%n</pattern>
</encoder>
</appender>
<logger name="com.zaxxer.hikari" level="DEBUG" additivity="false">
<appender-ref ref="HIKARICP" />
</logger>

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.