Hi,
I just tried with this option too with same result.
It looks like every setting related to queries is ignored.
The setting to log in a file is though executed - the file gets created:
Additionally I have set again show_sql to false and removed format_sql in jpaproperties as indicated in the mentioned article.
In this case the query is not logged at all...
I also removed show_sql from jpaproperties, so that only the settings in application.properties remained - in this case an unformatted query is printed, but with no parameter values. (As it is not printed to springboot.log I assume show_sql defaults to true.)
So, is there a way to make the application take these settings in application.properties into consideration?
LE: I have managed to get formatted query and parameters to the console using log4j.xml Thank you for the hint! With file appender the query is logged to console although it should be logged to a file. The file appender is though respected for the parameters. It looks as like the show_sql=true in jpaproperties has priority and loggs by default to console.
With log4j.properties it behaves similar to Springs's application properties - it simply seems to be ignored and query and parameters are not printed.
Still I would like to use the application.properties of Spring.
Opposed to the previous link,
this one says show_sql has to be true when using the org.hibernate.SQL logger in xml or properties file.