UPDATE: Due to a system crash and my poor backups, I no longer have the code for this post :( I'll try to reproduce it if I have time, but that's harder and harder to come by
OK, so I have the squid shaga engine code logging most everything to a MySQL table.
In order to successfully compile squid with this patch you will need liburi. You can download the pristine source for liburi here:
http://savannah.nongnu.org/cvs/?group_id=301