And yes it will capture your SQL
Here is some of our output in our console
p6spy
- 1196689443367|0|2|statement||select * from sysibm.SYSDUMMY1
-----Original Message-----
From: Tom Henricksen
[mailto:TomH <at> A-t-g.com]
Sent: Monday, December 03, 2007
7:42 AM
To: user-java <at> ibatis.apache.org
Subject: RE: Ibatis java.sql and
log4j
P6spy is pretty easy to
setup.
http://www.p6spy.com/documentation/index.htm
from what I remember you
basically point your system to there driver
driver=com.p6spy.engine.spy.P6SpyDriver
Then setup the
spy.properties to point to your drvier.
# ibm db2 driver
#
realdriver=COM.ibm.db2.jdbc.net.DB2Driver
realdriver=com.ibm.db2.jcc.DB2Driver
So in your case the
Sybase driver.
-----Original Message-----
From: Warren
[mailto:warren <at> clarksnutrition.com]
Sent: Friday, November 30, 2007
5:17 PM
To: user-java <at> ibatis.apache.org
Subject: RE: Ibatis java.sql and
log4j
Thanks, I will quit knocking myself out trying to get
JDBC to log by itself. p6spy, will this allow me to capture SQL
statements. I am trying to rewrite an old servlet/jsp app that is no longer
supported. It would sure speed things up if I could get my hands on the SQL. I
do not have the source code and I have decompiled it, but its a mess. I am
trying to get request level logging on the db side, but have not had any luck.
It uses Sybase SQL Anywhere 8.0.2. Any sugestions?
-----Original
Message-----
From: Jeff Butler
[mailto:jeffgbutler <at> gmail.com]
Sent: Friday, November 30, 2007
1:42 PM
To: user-java <at> ibatis.apache.org
Subject: Re: Ibatis java.sql and
log4j
iBATIS logs to the java.sql objects - so all the
java.sql logging entries you see are actually iBATIS entries - NOT standard
java.sql entries. This is a <sarcasm>feature</sarcasm> of
iBATIS and will not be available in other environments.
Many JDBC drivers can be configured to do logging, or
you can use p6spy, in other environments.
On Nov 30, 2007 3:33 PM, Warren <warren <at> clarksnutrition.com>
wrote:
I
have an app that uses Ibatis and log4j to log Ibatis and java.sql. It logs
perfectly. I have another app that does not use Ibatis and I can not get
log4j to log java.sql. I know that logging is working and log4j has
initialized logging for java.sql.
Is Ibatis working with java.sql somehow so that log4j can log SQL
statements, or should you be able to log SQL statement and java.sql without
Ibatis?
Thanks,
Warren