ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gwyn Evans" <gwyn.ev...@gmail.com>
Subject Re: Logging oddity
Date Tue, 13 Nov 2007 20:30:50 GMT
Ah, thanks...  I've added a page to that effect below the "Not Yet
Documented" page on the Wiki.

/Gwyn

On 13/11/2007, Jeff Butler <jeffgbutler@gmail.com> wrote:
> 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
> >

Mime
View raw message