最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

spring data jpa - How to log connections so we can see which pool item was used? - Stack Overflow

programmeradmin5浏览0评论

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.zaxxer.hikari=DEBUG 

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

Spring Boot 3.4, Java 21.

发布评论

评论列表(0)

  1. 暂无评论