Is it possible to output generated SQL using EclipseLink without having to increase log verbosity?

Put the following properties in your persistence.xml:

 <property name="eclipselink.logging.level.sql" value="FINE"/>
 <property name="eclipselink.logging.parameters" value="true"/>

The latter is helpful, so that the values of the parameter are shown.

An alternative is using log4jdbc or log4jdbc-remix.

Leave a Comment