qParser was written to parse weblogs and let me know what search queries were bringing people to my home site. The source is written in Perl and is publicly available.
Below are sample log analysis results which show which queries brought users to my site:
cyphgen.com.access_log: google 220.236.180.77 (using port 79) cyphgen.com.access_log: yahoo 72.67.24.141 (logos what is it?) cyphgen.com.access_log: yahoo 24.111.18.114 (phobia of squirrels) cyphgen.com.access_log: google 86.126.82.163 (fear of squirrels) cyphgen.com.access_log: google 86.126.82.163 (fear of squirrels) cyphgen.com.access_log: google 86.126.82.163 (Sciurophobia - Fear of Squirrels) cyphgen.com.access_log: google 203.62.10.9 (barce)