Spring JPA: logging Hibernate query parameters with LOG4J2
authorGustavo Martin Morcuende <gu.martinm@gmail.com>
Mon, 25 Jul 2016 19:16:53 +0000 (21:16 +0200)
committerGustavo Martin Morcuende <gu.martinm@gmail.com>
Mon, 25 Jul 2016 19:16:53 +0000 (21:16 +0200)
SpringJava/JPA/spring-jpa-resources/src/main/resources/log4j2.xml

index eec10be..0936f8c 100644 (file)
                <AppenderRef ref="STDOUT" />
        </Logger>
 
+       <!--
+               Logging Hibernate QUERY PARAMETERS requires TRACE level.
+        -->
+       <Logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" additivity="false">
+               <AppenderRef ref="STDOUT" />
+       </Logger>
+
+
        <!-- 
                Anything else will be using TRACE logging level.
        -->