[rt-users] getting detailed info on db queries.

Gurdon Merchant gmerchant at invisibleit.com
Wed Mar 3 17:44:18 EST 2004


There are several methods of logging queries.

The relational db you have chosen will have its own method: consult the
manuals.

Perl's DBI module is used in RT.  It's docs are here:

http://search.cpan.org/~timb/DBI-1.41/DBI.pm

The debugging section for DBI is here:

http://search.cpan.org/~timb/DBI-1.41/DBI.pm#DEBUGGING

Exporting the DBI_TRACE variable prior to starting Apache will allow you
to log DBI calls.

Assuming you are using Apache 1.3.x and modperl1, in httpd.conf you can
add:

PerlSetEnv DBI_TRACE 2=/opt/rt3/var/log/dbi.log

which came from here:

http://perl.apache.org/docs/1.0/guide/config.html#PerlSetEnv_and_PerlPas
sEnv


touch /opt/rt3/var/log/dbi.log and chown it to have the proper
user/group (i.e. the one Apache is running under.

Now restart Apache (i.e. RT).


/opt/rt3/var/log/dbi.log will start to fill up as you do searches in RT.


It sounds like the logging facility of your relational db is more what
you are looking for.  Looking at the DBI level can give some insight
into what modules are making which queries.



Gurdon
 






> -----Original Message-----
> From: rt-users-bounces at lists.bestpractical.com 
> [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf 
> Of Michael S. Liebman
> Sent: Wednesday, March 03, 2004 1:56 PM
> To: Patrick Hurley
> Cc: rt-users at lists.bestpractical.com
> Subject: Re: [rt-users] getting detailed info on db queries.
> 
> On Wed, Mar 03, 2004 at 03:30:53PM -0600, Patrick Hurley wrote:
> > 
> > Does there exist any verbose or debug flag within RT 
> somewhere which 
> > would allow one to see the actual database queries that are being 
> > performed by RT?
> 
> Nope. Use your databases query logging facility.
> 
> Michael
> -- 
> Michael S. Liebman                      m-liebman at northwestern.edu
>                   http://msl521.freeshell.org/ "I have vision 
> and the rest of the world wears bifocals."
>         -Paul Newman in "Butch Cassidy & the Sundance Kid"
> _______________________________________________
> rt-users mailing list
> rt-users at lists.bestpractical.com
> http://lists.bestpractical.com/mailman/listinfo/rt-users
> 
> Have you read the FAQ? The RT FAQ Manager lives at 
> http://fsck.com/rtfm
> 
> 



More information about the rt-users mailing list