Difference between revisions of "Customized Logs"

From Genwiki

Jump to: navigation, search
Line 13: Line 13:
  
 
<font size="-1" color="green">
 
<font size="-1" color="green">
* ''Rev 1.2 Oct 22, 2006'' - support for V6.0.2  
+
* ''Rev 1.2 Nov 19, 2006'' - Package names updated, NO file changes required for V6.0.3
 +
* ''Rev 1.2 Oct 22, 2006'' - support for V6.0.2
 
* ''Rev 1.1 Oct 11, 2006'' - minor update to include the 6.0.1 updates to the log.php file.  Rev 1.0 will also work with v6.0.1.  This release has been included for completeness  
 
* ''Rev 1.1 Oct 11, 2006'' - minor update to include the 6.0.1 updates to the log.php file.  Rev 1.0 will also work with v6.0.1.  This release has been included for completeness  
 
* ''Rev 1.0 Sep 30, 2006'' - initial release  
 
* ''Rev 1.0 Sep 30, 2006'' - initial release  
Line 41: Line 42:
 
* The zip file [[Media:Customized Logs Rev 1.2.zip|Customized Logs Rev 1.2.zip]] contains:
 
* The zip file [[Media:Customized Logs Rev 1.2.zip|Customized Logs Rev 1.2.zip]] contains:
 
** botlogxml.php - this file extracts and prints the crawler log file, called from showbotlog.php, fashioned after logxml.php
 
** botlogxml.php - this file extracts and prints the crawler log file, called from showbotlog.php, fashioned after logxml.php
** version 6.0.0/6.0.1/6.0.2
+
** version 6.0.0/6.0.1/6.0.2-3
 
***log.php <font color="red">a modified TNG file</font>  
 
***log.php <font color="red">a modified TNG file</font>  
 
***showlog.php <font color="red">a modified TNG file</font>  
 
***showlog.php <font color="red">a modified TNG file</font>  

Revision as of 08:41, 19 November 2006

If you are not comfortable with html and php editing, this page may not be for you


Overview

This TNG modification will change the way site accesses are logged.

  • It will include additional information indicating where the access was linked from (the referrer info)
  • It will split the log into two files: one for browsers and one for crawlers
  • It will enhance the filter options available through the ADMIN->SETUP->Log Settings. Filtering based upon Host IP Address and logged in User Descriptions will be added to the existing filter on Host Name.


  • Rev 1.2 Nov 19, 2006 - Package names updated, NO file changes required for V6.0.3
  • Rev 1.2 Oct 22, 2006 - support for V6.0.2
  • Rev 1.1 Oct 11, 2006 - minor update to include the 6.0.1 updates to the log.php file. Rev 1.0 will also work with v6.0.1. This release has been included for completeness
  • Rev 1.0 Sep 30, 2006 - initial release


Requirements

  1. A working TNG installation - see The Next Generation of Genealogy Sitebuilding
  2. A backup of your TNG files
    • showlog.php
    • log.php


Side Effects

  1. As with any modification to a TNG file, this modification will get lost during your next TNG version update and you will need to re-implement the mod.


TNG Installation Contents

The following zip file contains the necessary files to allow the addition of this feature.

  • The zip file Customized Logs Rev 1.2.zip contains:
    • botlogxml.php - this file extracts and prints the crawler log file, called from showbotlog.php, fashioned after logxml.php
    • version 6.0.0/6.0.1/6.0.2-3
      • log.php a modified TNG file
      • showlog.php a modified TNG file
      • showbotlog.php - this will frame the crawler log file (fashioned after showlog.php)
    • botgenlog.txt - a blank crawler log file


Installation for TNG Version 6

  • IF you are not running TNG version 6.0.x, or you have modified either log.php or showlog.php, DO NOT proceed. You will lose any modifications you have made to those files.
  1. ensure you have a backup of the following files found in your base TNG folder
    • log.php
    • showlog.php
  2. download this zip (Customized Logs Rev 1.2.zip)
  3. unzip it, examine the contents
  4. select the log.php,showlog.php, and showbotlog.php files from the appropriate version folder
  5. The log.php file may need to be customized to identify your favourite crawlers
    • it is preconfigured for googlebot, msnbot, inktomi, werelate, Panscient, and gigablast
    • if you wish to add others then
      • locate, open, and edit the new log.php file. You can use notepad, wordpad, or another text editor
      • find the section that checks for the crawlers and add another line following the same syntax
      • save and close the file
  6. copy all 5 files to your base TNG folder
    • the two files identified in step 1 will replace existing TNG V6.0.x files
  7. ensure the new logfile "botgenlog.txt" is writeable
  8. check it out


How do I see what it is doing?

  • Regular browser accesses will continue to be added to the normal log file. This will continue to be viewed as always, through accessing the showlog.php script.
  • Crawler accesses (those listed in the log.php file) will be diverted to the botgenlog.txt file. This may be viewed directly via the showbotlog.php script, or by clicking on the link on the Regular access display page just above the log listing.
  • Remember that you can exclude log entries to the regular Browser log by listing them on the Admin->Setup->Log_Settings page. Use the field labeled "Exclude Host Name". You can insert multiple exclusions separated by commas.
    • exclude by specific IP address: 192.168.1.1
    • exclude by IP address range: 192.168.1.
    • exclude by Host Name
    • exclude by any part match of the User Description: If your admin user description was Site Administrator, then entering Admin would exclude that user's entries when logged in


In the event of a problem with this modification

  1. copy your backup log.php and showlog.php files to your base TNG folder
    • all should be well now
  2. you may also delete the botlogxml.php, showbotlog.php, and botgenlog.txt files


Support

  1. You're sort of on your own... If you have a specific question, or feel some additional info in the above would help others, feel free to contact me directly. Mail me here
    • Please post suggestions, or your own flavour of this mod to the forum or list
Personal tools