Jump to content

Activity logs


Guest K. T. Walrus

Recommended Posts

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.

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...