My Spring Boot application keeps showing Hibernate queries in the console despite having configured Hibernate's specific logging with Logback as follows:
<appender name="HIBERNATE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOGDIR}/hibernate.log</file>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss} - %msg%n</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOGDIR}/hibernate.log.%d</fileNamePattern>
</rollingPolicy>
</appender>
<logger name="org.hibernate" additivity="false">
<appender-ref ref="HIBERNATE"/>
</logger>
<logger name="org.hibernate.SQL" additivity="false">
<appender-ref ref="HIBERNATE"/>
</logger>
<logger name="org.hibernate.type.descriptor.sql" additivity="false">
<appender-ref ref="HIBERNATE"/>
</logger>
It does send Hibernate's logs, including queries, to the file hibernate.log
. But I would also like to avoid the queries in the console, which I think should be happening with this configuration.
What am I missing?
hibernate.show_sql
config enabled? If so, just disable it