You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Mishkin, Ernest" <er...@qwest.com> on 2004/04/23 16:58:34 UTC
[DbUtils] logging sql statement
Hello,
I believe it's a nice feature when a JDBC-wrapping framework like
DbUtils can automatically log sql statements before execution (with
configurable priority of course).
I implemented that as part of my "own" little wrapper class and founded
that to be indispensable when during debugging sessions...
Is there any interest in adding this feature to DbUtils? If there is,
I'd be willing to work on that.
Regards,
Ernest Mishkin
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
RE: [DbUtils] logging sql statement
Posted by David Graham <gr...@yahoo.com>.
--- Alex Karasulu <ao...@bellsouth.net> wrote:
> David,
>
> At the risk of sounding like a broken record I'll reference another
> conversation on the same topic about a week ago:
>
>
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=commons-dev@jakarta.apac
> he.org&msgNo=48051
>
> Do you use this technique or something similar to no have
> dependencies on logging jars?
No, DbUtils just doesn't log anything. All exceptions are passed out to
the client so they can log them if they like.
David
>
> Alex
>
> > -----Original Message-----
> > From: David Graham [mailto:grahamdavid1980@yahoo.com]
> > Sent: Friday, April 23, 2004 5:19 PM
> > To: Jakarta Commons Developers List
> > Subject: Re: [DbUtils] logging sql statement
> >
> > Logging is intentionally left out of DbUtils so that it remains a
> simple
> > one jar distro. It would be easy to subclass QueryRunner and override
> the
> > methods you were interested in, logging, and then delegating to the
> super
> > implementation to do the real work.
> >
> > DbUtils does wrap all SQLExceptions thrown from the JDBC driver with
> its
> > own SQLException containing the SQL and replacement parameters that
> were
> > executing at the time of failure so logging may not be as important.
> >
> > David
> >
> > --- "Mishkin, Ernest" <er...@qwest.com> wrote:
> > > Hello,
> > >
> > > I believe it's a nice feature when a JDBC-wrapping framework like
> > > DbUtils can automatically log sql statements before execution (with
> > > configurable priority of course).
> > > I implemented that as part of my "own" little wrapper class and
> founded
> > > that to be indispensable when during debugging sessions...
> > >
> > > Is there any interest in adding this feature to DbUtils? If there
> is,
> > > I'd be willing to work on that.
> > >
> > > Regards,
> > > Ernest Mishkin
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> > >
> >
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Photos: High-quality 4x6 digital prints for 25"
> > http://photos.yahoo.com/ph/print_splash
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25�
http://photos.yahoo.com/ph/print_splash
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
RE: [DbUtils] logging sql statement
Posted by Alex Karasulu <ao...@bellsouth.net>.
David,
At the risk of sounding like a broken record I'll reference another
conversation on the same topic about a week ago:
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=commons-dev@jakarta.apac
he.org&msgNo=48051
Do you use this technique or something similar to no have
dependencies on logging jars?
Alex
> -----Original Message-----
> From: David Graham [mailto:grahamdavid1980@yahoo.com]
> Sent: Friday, April 23, 2004 5:19 PM
> To: Jakarta Commons Developers List
> Subject: Re: [DbUtils] logging sql statement
>
> Logging is intentionally left out of DbUtils so that it remains a simple
> one jar distro. It would be easy to subclass QueryRunner and override the
> methods you were interested in, logging, and then delegating to the super
> implementation to do the real work.
>
> DbUtils does wrap all SQLExceptions thrown from the JDBC driver with its
> own SQLException containing the SQL and replacement parameters that were
> executing at the time of failure so logging may not be as important.
>
> David
>
> --- "Mishkin, Ernest" <er...@qwest.com> wrote:
> > Hello,
> >
> > I believe it's a nice feature when a JDBC-wrapping framework like
> > DbUtils can automatically log sql statements before execution (with
> > configurable priority of course).
> > I implemented that as part of my "own" little wrapper class and founded
> > that to be indispensable when during debugging sessions...
> >
> > Is there any interest in adding this feature to DbUtils? If there is,
> > I'd be willing to work on that.
> >
> > Regards,
> > Ernest Mishkin
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for 25"
> http://photos.yahoo.com/ph/print_splash
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [DbUtils] logging sql statement
Posted by David Graham <gr...@yahoo.com>.
Logging is intentionally left out of DbUtils so that it remains a simple
one jar distro. It would be easy to subclass QueryRunner and override the
methods you were interested in, logging, and then delegating to the super
implementation to do the real work.
DbUtils does wrap all SQLExceptions thrown from the JDBC driver with its
own SQLException containing the SQL and replacement parameters that were
executing at the time of failure so logging may not be as important.
David
--- "Mishkin, Ernest" <er...@qwest.com> wrote:
> Hello,
>
> I believe it's a nice feature when a JDBC-wrapping framework like
> DbUtils can automatically log sql statements before execution (with
> configurable priority of course).
> I implemented that as part of my "own" little wrapper class and founded
> that to be indispensable when during debugging sessions...
>
> Is there any interest in adding this feature to DbUtils? If there is,
> I'd be willing to work on that.
>
> Regards,
> Ernest Mishkin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25�
http://photos.yahoo.com/ph/print_splash
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org