Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 29549 invoked from network); 3 Dec 2007 13:45:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Dec 2007 13:45:40 -0000 Received: (qmail 5952 invoked by uid 500); 3 Dec 2007 13:45:24 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 5941 invoked by uid 500); 3 Dec 2007 13:45:24 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 5921 invoked by uid 99); 3 Dec 2007 13:45:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Dec 2007 05:45:24 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of TomH@a-t-g.com designates 65.171.64.184 as permitted sender) Received: from [65.171.64.184] (HELO yitweb11.a-t-g.com) (65.171.64.184) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Dec 2007 13:45:02 +0000 Received: from mail.a-t-g.com ([65.171.64.187]) by yitweb11.a-t-g.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 3 Dec 2007 07:44:53 -0600 Received: from 65.171.64.163 ([65.171.64.163] helo=mail.a-t-g.com) by ASSPCentral; 3 Dec 2007 07:44:53 -0600 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C835B2.B5075AB4" X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: RE: Ibatis java.sql and log4j Date: Mon, 3 Dec 2007 07:45:03 -0600 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Ibatis java.sql and log4j thread-index: AcgzpyV9PB0GDt+rScKx24xvlSv3WgCCpxbwAAAyIaA= From: "Tom Henricksen" To: X-OriginalArrivalTime: 03 Dec 2007 13:44:53.0421 (UTC) FILETIME=[AEDCB5D0:01C835B2] X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------_=_NextPart_001_01C835B2.B5075AB4 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable And yes it will capture your SQL Here is some of our output in our console =20 p6spy - 1196689443367|0|2|statement||select * from sysibm.SYSDUMMY1 =20 -----Original Message----- From: Tom Henricksen [mailto:TomH@A-t-g.com]=20 Sent: Monday, December 03, 2007 7:42 AM To: user-java@ibatis.apache.org Subject: RE: Ibatis java.sql and log4j =20 P6spy is pretty easy to setup. =20 http://www.p6spy.com/documentation/index.htm =20 =20 from what I remember you basically point your system to there driver =20 driver=3Dcom.p6spy.engine.spy.P6SpyDriver =20 Then setup the spy.properties to point to your drvier. # ibm db2 driver # realdriver=3DCOM.ibm.db2.jdbc.net.DB2Driver realdriver=3Dcom.ibm.db2.jcc.DB2Driver =20 So in your case the Sybase driver. =20 -----Original Message----- From: Warren [mailto:warren@clarksnutrition.com]=20 Sent: Friday, November 30, 2007 5:17 PM To: user-java@ibatis.apache.org Subject: RE: Ibatis java.sql and log4j =20 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@gmail.com] Sent: Friday, November 30, 2007 1:42 PM To: user-java@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 feature of iBATIS and will not be available in other environments.=20 =20 Many JDBC drivers can be configured to do logging, or you can use p6spy, in other environments. =20 Jeff Butler =20 =20 =20 On Nov 30, 2007 3:33 PM, Warren 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 =20 ------_=_NextPart_001_01C835B2.B5075AB4 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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@A-t-g.com]
Sent: Monday, December = 03, 2007 7:42 AM
To: = user-java@ibatis.apache.org
Subject: RE: Ibatis = java.sql and log4j

 

P6spy is pretty = easy to setup.

 

http://www.p6spy.co= m/documentation/index.htm

 

 

from what I = remember you basically point your system to there driver

 

driver=3Dcom.p6sp= y.engine.spy.P6SpyDriver

 

Then setup the spy.properties to point to your drvier.


# ibm db2 = driver

# realdriver=3DCOM.ibm.db2.jdbc.net.DB2Driver

realdriver=3Dcom.ibm.db2.jcc.DB2Driver

 

 So in your = case the Sybase driver.

 

-----Original = Message-----
From: Warren [mailto:warren@clarksnutrition.com]
Sent: Friday, November = 30, 2007 5:17 PM
To: = user-java@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@gmail.com]
Sent: Friday, November = 30, 2007 1:42 PM
To: = user-java@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.

 

Jeff Butler

 

 



 

On Nov 30, 2007 3:33 PM, Warren <warren@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

 

------_=_NextPart_001_01C835B2.B5075AB4--