John Little
John Little

Reputation: 12447

How to log connections so we can see which pool item was used?

Safari created a post where they share the following Hikari Pool INFO logging:

2021-07-01 13:53:04.065  INFO  HikariDataSource-getConnection():110 - [ HikariPool-1 - Starting... ]
2021-07-01 13:53:04.499  INFO  HikariDataSource-getConnection():123 - [ HikariPool-1 - Start completed. ]

In order to understand our application's use of pools, we want to get the same output. By default, there is no logging of any JPA related info.

We have tried the following:

logging.level.root=INFO
logging.level.com.zaxxer.hikari=DEBUG 

But nothing is logged when our app makes a connection to DB and returns some data (so we can't see which pool item it used).

Spring Boot 3.4, Java 21.

Upvotes: -2

Views: 27

Answers (0)

Related Questions