views:

306

answers:

1

Hello!

I want to output the SQL generated by EclipseLink to the console, during development. However, I could only do so using the logging level FINE. I have a complex domain model composed of many classes, so much that deployment takes a considerable ammount of time when the log verbosity is on the FINE level, since EclipseLink outputs its analysis of the whole model.

Is there a way to get the SQL without resorting to log level FINE (like Hibernate does)?

+1  A: 

The log generation for EclipseLink seems quite difficult to set, according to this thread.

It mentions a persistence.xml file with log level you can adapt:

<property name="eclipselink.weaving" value="static" />
<property name="eclipselink.logging.level.sql" value="FINEST" />
<property name="eclipselink.logging.level" value="FINEST" />
<property name="eclipselink.logging.level.cache" value="FINEST" />

But some other settings may be needed.

VonC
Yes, it works. Thanks a lot!The new question now is - why isn't it documented somewhere? And if it is, why isn't this easy to find? ;)
javabeats