Hth:
<property name="openjpa.Log" value="File=../logs/openjpa.log,
DefaultLevel=DEBUG, Runtime=DEBUG, SQL=DEBUG"/>
On May 16, 2012 9:28 PM, "Bertrand Guay-Paquet" <
bernie@step...>
wrote:
> Hi,
>
> Another question regarding logging + TomEE :)
>
> I followed the instructions in the OpenJPA documentation to increase the
> logging level of JPA to show SQL statements but it didn't work. Do I need
> to do anything special for it to work inside TomEE? Ideally, I'd love to
> set the logging level for a single WAR.
>
> Here's what I tried.
>
> In persistence.xml:
> <property name="openjpa.Log" value="slf4j" />
>
> In WEB-INF/classes/log4j.**properties of my WAR:
> log4j.category.openjpa=TRACE
> log4j.category.openjpa.jdbc.**SQL=TRACE
> log4j.category.openjpa.Query=**TRACE
>
> In conf/logging.properties:
> log4j.category.openjpa=TRACE
> log4j.category.openjpa.jdbc.**SQL=TRACE
> log4j.category.openjpa.Query=**TRACE
>
> In the catalina log I see:
> WARNING: Log4j not installed. The following properties will be ignored.
> 16-May-2012 3:41:16 PM org.apache.openejb.OpenEJB$**Instance <init>
> WARNING: Ignored conf/logging.properties property 'log4j.category.openjpa'
> 16-May-2012 3:41:16 PM org.apache.openejb.OpenEJB$**Instance <init>
> WARNING: Ignored conf/logging.properties property
> 'log4j.category.openjpa.jdbc.**SQL'
> 16-May-2012 3:41:16 PM org.apache.openejb.OpenEJB$**Instance <init>
> WARNING: Ignored conf/logging.properties property
> 'log4j.category.openjpa.Query'
>
> Obviously, I'm not using the right approach but I don't know where to find
> instructions so I'm asking here.
>
> Regards,
> Bertrand
>
opensubscriber is not affiliated with the authors of this message nor responsible for its content.