5

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?

Seb
  • 1,118
  • 1
  • 11
  • 25
  • I am having the same issue. Please can you post your solution if you have been able to resolve this – Paullo Apr 16 '15 at 19:05
  • Sorry but i have no solution, but i know that the problem appear only when i launch unit tests with Arquillian – Seb May 06 '15 at 09:54

1 Answers1

7

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.

Xiaodong Xie
  • 149
  • 3
  • 5