如何将JPA sql日志配置为spring-boot-starter-log4j2

时间:2017-07-31 11:43:04

标签: hibernate jpa logging log4j2

问题陈述:

我在spring boot项目中实现了log4j2(1.4.0.RELEASE)。

现在我想将Hibernate SQL查询日志添加到log4j2日志文件中。

我无法将hibernate生成的sql查询添加到log4j2日志记录中。

请建议。

使用的版本是: 使用的log4j2依赖项:compile group: 'org.springframework.boot', name: 'spring-boot-starter-log4j2', version: '1.4.0.RELEASE'

使用的JPA版本:compile("org.springframework.boot:spring-boot-starter-data-jpa:1.4.0.RELEASE")

0 个答案:

没有答案