Ok, this is what I want to do. I have a squid proxy setup on my webserver (which is running openSuSE 11.1) and every time a new entry is added to access.log, I want to dump the access information to a MySQL database. What is the best approach for me to do this?
Currently, I'm thinking of writing a daemon that checks for changes to the file like every 2-3 seconds, but I don't think that's a very efficient approach. In what other way could I achieve this?
The best solution I found, which is extremely specific to my requirement is use a 'redirect_program' for Squid: http://wiki.squid-cache.org/Features/Redirectors
This works perfectly for my purpose and gives me just enough information in the program to do my thing.
Thanks to paulsm4 for a perfect solution in case such a feature is not available.