Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable HikariPool logging

Tags:

This is perhaps a very simple question. How do i disable Hikari-CP debug logs? In my log file i have lots 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 logger configuration?

Thanks!

like image 734
siphiuel Avatar asked Dec 03 '14 14:12

siphiuel


People also ask

What is HikariConfig?

HikariConfig is the configuration class used to initialize a data source. It comes with four well-known, must-use parameters: username, password, jdbcUrl, and dataSourceClassName. Out of jdbcUrl and dataSourceClassName, we generally use one at a time.

What is Hikari connection pool?

"HikariCP is solid high-performance JDBC connection pool. A connection pool is a cache of database connections maintained so that the connections can be reused when future requests to the database are required. Connection pools may significantly reduce the overall resource usage." - You can find out more here.

What is the use of Hikari in spring boot?

Hikari is a JDBC DataSource implementation that provides a connection pooling mechanism. Compared to other implementations, it promises to be lightweight and better performing.


1 Answers

The logger name should be com.zaxxer.hikari not org.zaxxer.hikari.

like image 180
brettw Avatar answered Sep 17 '22 09:09

brettw