openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From twelveeighty <twelve.eig...@gmail.com>
Subject TomEE openJPA logging not working
Date Sun, 12 Aug 2012 22:48:46 GMT
I am stuck trying to get openJPA to log its openjpa.jdbc.SQL statements. No
matter what I try, I can't seem to bump up the log level for openJPA.
Ideally, I'd like to have those logged to my log4j configuration, but at
this point, I'll settle for ANY solution that will have me see those log
entries.

My app is an "all in one" WAR, as described in
http://openejb.apache.org/deploying-in-tomee.html.

Here's what I tried so far:

LOG4J:
I have a logging.properties file in the <tomee>/lib folder. In it, I use:
log4j.category.openjpa.jdbc.SQL=DEBUG

This is alongside my other log settings, which are working fine:
log4j.category.<myroot>=DEBUG, where <myroot> is the root package for my own
code.

For the deployed app, in the META-INF/persistence.xml, I have defined:
<property name="openjpa.Log" value="log4j"/>

This doesn't work. All I see in the catalina.out console log is the two
statements:
INFO - Starting OpenJPA 2.2.0
INFO - Using dictionary class
"org.apache.openjpa.jdbc.sql.PostgresDictionary".

But nothing in my log4j log.

JDK LOG:

For this, I added the following to the <tomee>/conf/logging.properties:
openjpa.jdbc.SQL.level=ALL

And then in my persistence.xml, I use:
<property name="openjpa.Log" value="commons"/>

This also doesn't work.

I am able to use openJPA logging in log4j with the described method on
"vanilla" Tomcat 7 with openJPA, so I do not think this is a problem with
openJPA.

Can someone point me in the right direction? Thanks!



--
View this message in context: http://openejb.979440.n4.nabble.com/TomEE-openJPA-logging-not-working-tp4656828.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message