Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 60034 invoked from network); 13 Nov 2007 17:36:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Nov 2007 17:36:15 -0000 Received: (qmail 76770 invoked by uid 500); 13 Nov 2007 17:36:01 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 76748 invoked by uid 500); 13 Nov 2007 17:36:01 -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 76737 invoked by uid 99); 13 Nov 2007 17:36:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2007 09:36:01 -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 jeffgbutler@gmail.com designates 209.85.146.183 as permitted sender) Received: from [209.85.146.183] (HELO wa-out-1112.google.com) (209.85.146.183) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2007 17:36:04 +0000 Received: by wa-out-1112.google.com with SMTP id j5so2302922wah for ; Tue, 13 Nov 2007 09:35:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=Lv45z3oOSP7NjNAh0D7yJJiL19OwdmDrhVaRe6JJrYE=; b=lmDAyfqY35o3Aq3KPVKNA9KQo/BsCzUC5tacsVs5itZIf5MUePTpm/9PTLeyw7DBQ+/ae4vceYmp35g8wE0SkUsSTlWw10cqxMdANkG3hvgA+GCWfrhb6rwIvNEEb8WWjGAV9rL2XJRI4oBSGxQAkO46erKfcbKfhrBUUNfzDT4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Rg8lY3EEGn9OxI9lXbBWcjxqAGP4ZwV+AkqVqleVbJ/+E+aLqVlgHZ7cCgdOrS8flk/ylGHi7Uv6uTCR1LglyM7he0qBbRDGai9tca1kd8FHfnc1AqKpYkorPutaph0DHsCfolUvU0galgEACPxP7T5sivl9fO4mTG4h45BjBHg= Received: by 10.115.90.1 with SMTP id s1mr126040wal.1194975343175; Tue, 13 Nov 2007 09:35:43 -0800 (PST) Received: by 10.115.111.12 with HTTP; Tue, 13 Nov 2007 09:35:43 -0800 (PST) Message-ID: Date: Tue, 13 Nov 2007 11:35:43 -0600 From: "Jeff Butler" To: user-java@ibatis.apache.org Subject: Re: Logging oddity In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_11566_13272357.1194975343169" References: X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_11566_13272357.1194975343169 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline This is related to a structural defect in the way iBATIS does logging. iBATIS does logging through dynamic proxies for all the JDBC objects - and these objects are only proxied if the Connection object itself is proxied. The Connection object is proxied only if debugging is enabled for it. So, you'll not get any logging unless debugging is enabled for Connection. It wouldn't be too difficult to fix I suppose. Jeff Butler On Nov 13, 2007 11:23 AM, Gwyn Evans wrote: > Hi - wonder if anyone can explain this... > > I'm testing with ibatis & am finding that if I have > > java.sql.Connection = Info > java.sql.PreparedStatement = Debug > java.sql.ResultSet = Debug > > then I don't get *any* ibatis logging, but if I change just the > java.sql.Connection value to Debug, then I get the following: > > 2007-11-13 17:17:57| |C-1|Connection|Debug|{conn-100000} Connection > 2007-11-13 17:17:57| |C-1|Connection|Debug|{conn-100000} Preparing > Statement: SELECT ID, DEST, SMSCA, T FROM SMSCAA ORDER BY ID ASC > LIMIT 1 > 2007-11-13 17:17:57| |C-1|PreparedStatement|Debug|{pstm-100001} > Executing Statement: SELECT ID, DEST, SMSCA, T FROM SMSCAA ORDER BY > ID ASC LIMIT 1 > 2007-11-13 17:17:57| |C-1|PreparedStatement|Debug|{pstm-100001} > Parameters: [] > 2007-11-13 17:17:57| |C-1|PreparedStatement|Debug|{pstm-100001} Types: > [] > 2007-11-13 17:17:57| |C-1|ResultSet|Debug|{rset-100002} ResultSet > > If I leave Connection as debug & raise PreparedStatement to Info, then > I loose that as expected, but I can't get PreparedStatement without > Connection? > > (The settings are from Simple-log, which is where JCL is being adapted > to, so could be an issue with that, I guess...) > > /Gwyn > ------=_Part_11566_13272357.1194975343169 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
This is related to a structural defect in the way iBATIS does logging.  iBATIS does logging through dynamic proxies for all the JDBC objects - and these objects are only proxied if the Connection object itself is proxied.  The Connection object is proxied only if debugging is enabled for it.  So, you'll not get any logging unless debugging is enabled for Connection.
 
It wouldn't be too difficult to fix I suppose.
 
Jeff Butler

On Nov 13, 2007 11:23 AM, Gwyn Evans <gwyn.evans@gmail.com> wrote:
Hi - wonder if anyone can explain this...

I'm testing with ibatis & am finding that if I have

java.sql.Connection = Info
java.sql.PreparedStatement = Debug
java.sql.ResultSet = Debug

then I don't get *any* ibatis logging, but if I change just the
java.sql.Connection value to Debug, then I get the following:

2007-11-13 17:17:57|   |C-1|Connection|Debug|{conn-100000} Connection
2007-11-13 17:17:57|   |C-1|Connection|Debug|{conn-100000} Preparing
Statement:  SELECT ID, DEST, SMSCA, T FROM SMSCAA ORDER BY ID ASC
LIMIT 1
2007-11-13 17:17:57|   |C-1|PreparedStatement|Debug|{pstm-100001}
Executing Statement:  SELECT ID, DEST, SMSCA, T FROM SMSCAA ORDER BY
ID ASC LIMIT 1
2007-11-13 17:17:57|   |C-1|PreparedStatement|Debug|{pstm-100001} Parameters: []
2007-11-13 17:17:57|   |C-1|PreparedStatement|Debug|{pstm-100001} Types: []
2007-11-13 17:17:57|   |C-1|ResultSet|Debug|{rset-100002} ResultSet

If I leave Connection as debug & raise PreparedStatement to Info, then
I loose that as expected, but I can't get PreparedStatement without
Connection?

(The settings are from Simple-log, which is where JCL is being adapted
to, so could be an issue with that, I guess...)

/Gwyn

------=_Part_11566_13272357.1194975343169--