K. T. Walrus
Jul 8 2006, 12:46 AM
This has probably been suggested before, but I would like to see an option for an activity log which appends a line for each page load to a log file on the server. This would show time, ip_address, member id, member name, the url query string, and shortened POST data (for text fields that are too long just log the first N chars).
I know the server logs have basically this information (although member names aren't shown directly), but it would be nice to be able to check this file to see what a member did while on the board. A circular log (if that is possible in PHP) could be an option so that only the last so many megabytes were kept in the file.
Luke
Jul 11 2006, 08:56 PM
Couldnt you use the apache logs to do this (as far as I know this is on by default) and then if you saw anything suspicious you could use the ip address mentioned in the log to link it to a member?
Not saying it wouldnt be nice, but at the PHP level this may be a bit extreme. Apache does it because it's at a higher level (before php is executed I believe).
K. T. Walrus
Jul 11 2006, 09:12 PM
I added this quite easily by adding a little logging code in my_deconstructor in ipsclass.php. Works quite nicely. I can now see all the board activity by user name (something that doesn't show up in the Apache logs).
I ended up just appending one line to a log file on every page load. It was a three line change. Now, I can just tail -f and watch the clicks... or grep on a user name and see their recent activity. Along with the time and member id/name, I'm logging the QUERY_STRING and the POST and GET values.
.Logan
Jul 11 2006, 09:52 PM
QUOTE(K. T. Walrus @ Jul 11 2006, 06:12 PM)

I added this quite easily by adding a little logging code in my_deconstructor in ipsclass.php. Works quite nicely. I can now see all the board activity by user name (something that doesn't show up in the Apache logs).
I ended up just appending one line to a log file on every page load. It was a three line change. Now, I can just tail -f and watch the clicks... or grep on a user name and see their recent activity. Along with the time and member id/name, I'm logging the QUERY_STRING and the POST and GET values.
Would you mind sharing your code?
ellawella
Jul 12 2006, 01:56 AM
Those are going to be some big logs
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.