I have read the following webpages but I cannot get the SQL from Eclipselink v2.1.1 to print out.
wiki.eclipse.org/EclipseLink/Examples/JPA/Logging
wiki.eclipse.org/Introduction_to_EclipseLink_Sessions_%28ELUG%29#Logging
wiki.eclipse.org/Configuring_a_Session_%28ELUG%29#How_to_Configure_a_Session_to_use_the_java.util.logging_Package
wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29#Using_EclipseLink_JPA_Extensions_for_Logging
I have a persistence.xml with this in it:
<properties>
<property name="eclipselink.target-database" value="MySQL"/>
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
<property name="javax.persistence.jdbc.user" value="trackerS"/>
<property name="eclipselink.cache.shared.default" value="false"/>
<property name="eclipselink.allow-zero-id" value="true"/>
<property name="eclipselink.logging.logger" value="JavaLogger"/>
<property name="eclipselink.logging.level.sql" value="FINEST" />
<property name="eclipselink.logging.level" value="FINEST" />
</properties>
I use java.util.logging and I have been using this logger.properties file in my testing:
handlers = java.util.logging.FileHandler
.level = ALL
tracker.level = ALL
# File Logging
java.util.logging.FileHandler.pattern = log/tracker-%u.log
java.util.logging.FileHandler.formatter = tracker.LogFormatter
java.util.logging.FileHandler.level = INFO
java.util.logging.FileHandler.append = true
java.util.logging.FileHandler.limit = 1000000
java.util.logging.FileHandler.count = 10
handlers = java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level = CONFIG
#org.eclipse.persistence.SessionLog.level = FINE
#eclipselink.logging.level = FINE
#org.eclipse.persistence.logging.SessionLog.FINE
#org.eclipse.persistence.logging.SessionLog.level=FINE
#org.eclipse.persistence.logging.SessionLog.level=FINE
#eclipselink.logging.level=FINE
#org.eclipse.persistence.*.sql=FINE
#eclipselink.logging.level=FINEST
#eclipselink.logging.level.sql=FINE
java.util.logging.ConsoleHandler.formatter = org.eclipse.persistence.logging.LogFormatter
#org.eclipse.persistence.LoggingSession.connection.level = FINE
I realize the ConsoleHandler is overriding the FileHandler right now. I've tried all the options that are commented out but nothing works.
Any ideas?