On Tue, Oct 13, 2009 at 10:11:13AM +0200, Lutz Steinborn wrote:
> On Tue, 13 Oct 2009 11:45:36 +0400
> Oleg Broytman <p...@phd.pp.ru> wrote:
> > On Tue, Oct 13, 2009 at 08:52:48AM +0200, Lutz Steinborn wrote:
> > > is there a way to log the query that SQLObject generates ?
> > 
> >    Sure. You can turn on debug flag in DB URI or connection:
> But this gives me all queries. What I wan't is a possibility to log only on
> query.

   You can override .get() or .select() or any other method in the
SQLObject class you are interesting in, lower logging level, call the
overridden method and restore logging level. For example, configure
logging at the INFO level, configure SQLObject at the debug level;
debug logging is not emitted at the INFO level; in your overridden methods
lower logging level to DEBUG and then back to INFO.

Oleg.
-- 
     Oleg Broytman            http://phd.pp.ru/            p...@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to