My question is, has anyone implemented a logging feature to the
> swish.cgi that would allow you to log searches, hits, ip,
Take a look at process_request for the subroutine. I had some success with the following line (placed AFTER the $results have been returned). This is a very quick hack. I'll leave it to you to figure out how to get pretty dates in the logfile (oh yeah, this'll log to a file called "debug.txt" in the swish-e directory. you may want to create this file first and 666 it, just to make sure; likewise, you'll want to set up some sort of log rotation so that this file doesn't grow insanely big):
open(FILE, ">>debug.txt"); print FILE time . " $ENV{REMOTE_ADDR} " . $results->{hits} . " hits for " . $results->{query_simple} . "\n"; close(FILE);
Sample output:
1114611063 63.173.138.23 15 hits for test 1114611222 63.173.138.23 46 hits for hello
-- Morbus Iff ( you are nothing without your robot car, NOTHING! ) Culture: http://www.disobey.com/ and http://www.gamegrene.com/ Spidering Hacks: http://amazon.com/exec/obidos/ASIN/0596005776/disobeycom icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus