How can I have a clean log of my visitors activity for each field of my farm ?
Notes and Comments
Log output :
2005/07/19 10:54:28 18.104.22.168 edit Files.Miscellaneous
2005/07/19 10:54:48 22.214.171.124 browse Files.Miscellaneous
The script generates one logfile for each day, and deletes old logs automatically.
$VisitorsLoggingDirectory = "
$WorkDir/VisitorsLogging/" . date("Y/m");
How to filter actions based on AuthId or Groupname, ...
SDV($VisitorsLoggingIgnoreAuthId, array('email@example.com', 'steph')); SDV($VisitorsLoggingIgnoreGroup, array('Main', 'Blog')); ... if (in_array($AuthId, $VisitorsLoggingIgnoreAuthId) == true) return; if (in_array(FmtPageName('$Group', $pagename), $VisitorsLoggingIgnoreGroup) == true) return;
- VisitorsLogging1337 for a more configurable version of this script
Logging to a wiki page instead of a pure text file: Cookbook:ActionLog
The latest version is available at http://www.christophedavid.org/w/c/w.php/Files/VisitorsLoggingphp (Do not try to download this, rather point your browser at it - it's a html file displaying the code.) cda
Q: Where are the logs kept?
A: With the defaults set, the log text files are in wiki.d/VisitorsLogging/ DaveG
Q: I can't get a wikilink either, to list the directory, or to list a file 20060314.txt there. Any tips? /Dagge
A: My solution to this was to direct the log files to the directory
uploads/VisitorsLogging instead. Then creating a page in the group VisitorsLogging with content
(:attachlist:), you will get a nice list of your log files. You can then also apply the IncludeFile recipe to this to display the actual content of the log files. Note: you should make the
uploads/VisitorsLogging read protected by adding a .htaccess file as described in SecureAttachments to prevent non-authorized users from viewing the logs. 13/08/2006 ThomasP
Christophe David original script