[rt-users] Logging query terms in RT

Kevin Falcone falcone at bestpractical.com
Wed Nov 16 16:17:03 EST 2011

On Wed, Nov 16, 2011 at 06:14:02PM -0000, Jeffery, Guy wrote:
>    Thanks for the response, DB logging might be the way I have to go.
>    Oddly, StatementLog doesn't log anything when submitting a query from Query Builder. Doesn't
>    even log that the database was hit at all.
>    I was equally curious about this!

Setting it to 'info' requires you to have your log system set to log
'info'.  Try temporarily setting it to 'error'.

Also, keep in mind that StatementLog is a performance hit.

On RT4 you can see the statement log for your session in the UI under


>    ----------------------------------------------------------------------------------------------
>    From: rt-users-bounces at lists.bestpractical.com on behalf of Kevin Falcone
>    Sent: Wed 16/11/2011 16:57
>    To: rt-users at lists.bestpractical.com
>    Subject: Re: [rt-users] Logging query terms in RT
>    On Wed, Nov 16, 2011 at 10:42:05AM -0000, Jeffery, Guy wrote:
>    >
>    >    Hi,
>    >
>    >    I'm supporting an instance of RT, and have a requirement to log all queries made in RT by
>    our
>    >    users, including all terms used to create the query.
>    >
>    >    I can capture the terms used in Simple Searches as part of a POST request within the
>    Apache
>    >    logs, so that problem is solved.
>    >
>    >    But I can't find any mechanism for logging the terms used to build more complex queries
>    in the
>    >    Query Builder. I've turned on the Statement log, and all other logging, at 'info' level.
>    >    However, RT still doesn't capture the information I need. The only place I've found this
>    >    information stored at all is within the a_session longblob in the sessions table on the
>    >    database - but it's not that nice to extract the individual terms from that. I've also
>    looked
>    >    on the Wiki and the forums without luck.
>    This would be easier to do at the database level.  It'll be too many
>    queries, but StatementLog will log too many queries also.
>    I'm curious why StatementLog isn't sufficient.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20111116/de96cf0a/attachment.sig>

More information about the rt-users mailing list