Help - Search - Members - Calendar
Full Version: Activity logs
Invision Power Services > Invision Power Services, Inc. > IPS Company Feedback > IP.Board
K. T. Walrus
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
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
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
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
Those are going to be some big logs blink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.