I’m using show_sql because I like to see what occurs, but I’d like to exclude a class (if necessary) because that runs a query every x minutes and I would rather not have that pop up in my log file.
Anyone know how I can achieve this?
I’m using show_sql because I like to see what occurs, but I’d like to
Share
There is a solution for this, but it’s not using the Hibernate show SQL property.
You can use P6Spy to log your queries. This is a JDBC proxy driver which you set as the driver class in your datasource configuration:
You can then edit your spy.properties file to exclude a specific table, as described here. This should then log all executed SQL (and parameters) and exclude your specified table.
There is more detail on the configuration in this article.