Logging query elides where clause

FWIW, I am using Eclipse. I have set

 <property name="hibernate.show_sql">true</property>

        <!-- Pretty print the SQL in the log and console -->
        <property name="hibenate.format_sql">true</property>

But the queries that get output to the console and the log are elided, e.g.

[database=maps, query=SELECT gid FROM mapdata.states WHERE ST_Intersects(the_geom, ST_GeometryFromText…]

Is there any way to have it output the full query without the elision (…)?

That query does not look like one coming from Hibernate.

You might want to consider a JDBC logging tool if you want more complex logs, like embedding parameters next to the query or display if batching is used.

1 Like