Disable HikariPool Logging

This is perhaps a very simple question. How to disable Hikari-CP debug logs? In my log file I have a lot of these messages

DEBUG [.zaxxer.hikari.pool.HikariPool:] - Before cleanup pool stats HikariPool-0 (total=10, inUse=0, avail=10, waiting=0) DEBUG [.zaxxer.hikari.pool.HikariPool:] - After cleanup pool stats HikariPool-0 (total=10, inUse=0, avail=10, waiting=0) 

and in my log4jConfig.xml:

 <logger name="org.zaxxer.hikari"> <level value="error"/> </logger> 

Can someone please tell me what is wrong with the registrar configuration?

Thanks!

+5
source share
2 answers

The registrar name must be com.zaxxer.hikari not org.zaxxer.hikari .

+10
source

The class name is displayed in you. Debug info: DEBUG [.zaxxer.hikari.pool.HikariPool:] -... here is the class name zaxxer.hikari.pool.HikariPool, just change the configuration file as disabled.

I use logback logger, in the resources folder there is a file called logback.xml to disable HikariPool logging, I write the following configuration:

  <configuration> ... <logger name="com.zaxxer.hikari.pool.PoolBase" level="ERROR"/> <logger name="com.zaxxer.hikari.pool.HikariPool" level="ERROR"/> <logger name="com.zaxxer.hikari.HikariDataSource" level="ERROR"/> </configuration> 
0
source

Source: https://habr.com/ru/post/1208250/


All Articles