Query Logging

Post Reply
User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Query Logging

Post by Thunderstone »



I understand that version 2.1 of Webinator supports the
logging of user queries, but I can't seem to find enough info in the
documentation on how to turn this feature on. What are the steps
and where how do you read the subsequent query log?

Thanks.
Mark Taylor



User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Query Logging

Post by Thunderstone »




There's a table called "querylog" in the database which is for use
in query logging. It has 3 fields:
id counter
Client varchar
Query varchar
You just do something like:

<sql "insert into querylog values(counter,$REMOTE_HOST,$arg)"></sql>

Just after or before the "<runquery>" call in the "main" function of
the default search script. You could log any other desired information
in the Client and Query fields. You could also do it at some other point
in the script if you wanted to log different things.

Read the log with SQL select statements:
gw -s "select * from querylog"
Or get fancy and write a Vortex script to process and print it out.


Post Reply