Logging JPA queries? #25659
-
|
Hello everyone. <property name="eclipselink.logging.level" value="FINE"/>
<property name="eclipselink.logging.parameters" value="true"/>
<property name="eclipselink.logging.level.sql" value="FINE"/>
but I'm not seeing any SQL logs. Is there any additional configuration? I'm using version 7.0.25 of GlassFish. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi, @diegosilval, I'm pretty sure that when using EclipseLink in GlassFish, you don't need to modify the persistence.xml file to change logging. It should be enough to set FINE or lower logging level for the eclipselink logger in GlassFish. The logger name is I think "org.eclipse.persistence.session". Note that in GlassFish, log levels lower than INFO are only logged to server.log file, not to console. If you want them logged also in console (if running GlassFish in foreground or in Docker container), you should set the log level of org.glassfish.main.jul.handler.SimpleLogHandler to the log level you want to log. Maybe you still need to set |
Beta Was this translation helpful? Give feedback.
Hi, @diegosilval,
I'm pretty sure that when using EclipseLink in GlassFish, you don't need to modify the persistence.xml file to change logging. It should be enough to set FINE or lower logging level for the eclipselink logger in GlassFish. The logger name is I think "org.eclipse.persistence.session".
You have to set the logger level in GlassFish because EclipseLink logs using GlassFish's log manager.
Note that in GlassFish, log levels lower than INFO are only logged to server.log file, not to console. If you want them logged also in console (if running GlassFish in foreground or in Docker container), you should set the log level of org.glassfish.main.jul.handler.SimpleLogHandler to the l…