I use wildfly with EclipseLink and I want to trace SQL statements. I configured EclipseLink according to documentation, all work fine except the SQL logs. I added these properties in my persistence.xml:
<properties>
<property name="eclipselink.logging.level.sql" value="FINE" />
<property name="eclipselink.logging.parameters" value="true" />
<property name="eclipselink.debug" value="OFF" />
<property name="eclipselink.weaving" value="static" />
<property name="eclipselink.logging.logger" value="DefaultLogger" />
</properties>
but no SQL logs. What am I doing wrong?
Here is the what works for me. I'm using Wildfly 8.2.0, eclipselink 2.5.1.
Just add
<logger category="org.eclipse.persistence.sql">
<level name="DEBUG"/>
</logger>
<logger category="org.jboss.as.jpa">
<level name="DEBUG"/>
</logger>
to logging subsystem, in standalone.xml (in the configuration folder).
Just between
<subsystem xmlns="urn:jboss:domain:logging:2.0">
......
</subsystem>
The logging level for console handler should be at least set to DEBUG, like this:
<console-handler name="CONSOLE">
<level name="DEBUG"/>
<formatter>
<named-formatter name="COLOR-PATTERN"/>
</formatter>
</console-handler>
The same for file-handler.
Good luck.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With