JPA Logging Level on Glassfish v3 Server
<property name="eclipselink.logging.level" value="FINE" /> How to configure server logging level. I want to see Level.FINE on my development server. But, of course, only Level.WARNING on a production server.
If I put the line above in the persistence.xml file, it will automatically configure on both machines. I must remember to turn it off manually. And this, of course, is dangerous.
Thank you very much.
You can link EclipseLink / Examples / JPA / Logging
Note. Installing eclipselink.logging.level in FINE is not enough (since EclipseLink 2.4.0 - Juno), you must install eclipselink.logging.level.sql in FINE.
<property name="eclipselink.logging.level" value="FINE"/> <property name="eclipselink.logging.level.sql" value="FINE"/> <property name="eclipselink.logging.parameters" value="true"/> I myself struggled with this. I found that on GlassFish (in section 3.1.2) you are editing the logging.properties file from the Glassfish domains / domain / config directory.
Locate the org.eclipse.persistence.session.level entry and modify it as follows:
org.eclipse.persistence.session.level=FINE In addition to this, I found that I need to add these two entries:
org.eclipse.persistence.level = FINE org.eclipse.persistence.sql.level = FINE When editing a logging.properties file like this, there is no need to add anything to the persistence.xml file regarding logging, and it will meet your requirements above.
NOTE I have not yet succeeded in getting eclipselink.logging.parameter = true to work in the persistence.xml file (it cannot be assigned in logging.properties). So, the SQL log works, just not with a complete reset of the bindings.