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
You can set the levels of Hikari loggers dynamically:
import org.apache.log4j.Logger;
import org.apache.log4j.Level;
public class App{
public static main(String[] args) {
Logger.getLogger("com.zaxxer.hikari.pool.PoolBase").setLevel(Level.OFF);
Logger.getLogger("com.zaxxer.hikari.pool.HikariPool").setLevel(Level.OFF);
Logger.getLogger("com.zaxxer.hikari.HikariDataSource").setLevel(Level.OFF);
Logger.getLogger("com.zaxxer.hikari.HikariConfig").setLevel(Level.OFF);
Logger.getLogger("com.zaxxer.hikari.util.DriverDataSource").setLevel(Level.OFF);
}
}
I have tested this on hikariCP 3.4.1 with log4j 1.2.17