UW Information Technology supports the Personal Log File service so you can accurately track requests to your website. This article describes the different log files to choose from and how to turn them on and off. It also provides advice on managing your log files so you don't waste space or exceed your disk quota.
Personal log files are individual files in your Web directory that accrue information about the requests made to your website. Here's how they work. During the day, the Web server logs information about every request it serves. Around midnight, we go to work and sort out the information relevant to your website. All you have to do to receive this information is turn on the corresponding personal log file. You have three different personal log files to choose from: access_log, referer_log, and extended_log. Their formats are described below.
Your personal access_log file contains information formatted in the common logfile format. This is a popular format used by many Web servers. Most log file analysis tools can process this format. Each line in your access_log file represents one request. For example:
bu.bu.edu - - [03/Aug/2001:22:41:42 -0700] "GET /webdemo/page.html HTTP/1.0" 200 988
In this case, bu.bu.edu is the computer that made a request for /webdemo/page.html on the night of August, 3, 2001. The request was successful (that's what 200 means) and 988 bytes were sent.
Your personal referer_log file contains information about references to your website. It is often helpful to turn on your referer_log file to determine what Web pages link to yours and thus how people find your website. Each line in your referer_log file represents one request that was logged with referring information. Here are some hypothetical examples:
http://www.washington.edu/computing/Web/index.html -> /webdemo/index.html http://search.yahoo.com/bin/search?p=webdemo -> /webdemo/index.html
In both cases, the page on the left referred someone to the webdemo home page and the resulting request was logged. The first example is typical referer_log file information: it lists one address that links to the webdemo home page. The second example illustrates how someone might have found the webdemo home page by searching the Yahoo subject catalog. If your website has been indexed by Internet search services, such as Yahoo or AltaVista, your referer_log reveals what services and search words people use to find your website.
Your personal extended_log file contains a mixture of access_log and referer_log information, with Web browser information added for good measure.
Before you turn on any personal log file, plan for the incoming information. Remember you continue to receive nightly installments until you run out of disk space. Avoid the fate of the Sorcerer's apprentice: keep an eye on your personal log files!
The Personal Log File service hinges on the existence of specific files in your Web directory, called, appropriately, access_log, referer_log, and extended_log. When one of these files exists, it accrues data via nightly installments. You can turn on one, two, or all three of these files, depending on the information you want to receive. To turn on a personal log file:
cd public_html
touch extended_logAt this point, your log file is turned on, but it will be empty until sometime around midnight when the first batch of data is delivered.
chmod 600 extended_log
Since the Personal Log File service hinges on the presence of files in your Web directory, all you have to do to turn off a log files is rename or remove the appropriate file. To turn off a personal log file:
cd public_html
rm extended_logAlternatively, to turn off your personal extended_log file and keep what's in it, enter:
mv extended_log extended_log.bak
UW Information Technology does not provide access to log file data except through the Personal Log File service. Remember you receive no installments while your personal log files are turned off.
After a while, you should delete or archive your personal log file data to save disk space. If you want to archive your data for future use, pick a good time, perhaps the first day of each month, and archive any personal log files you have turned on. One way to do this is illustrated below, using the extended_log file as an example. To archive your extended_log file:
cd public_html
mv extended_log extended_log.jun.2001Now your data is archived in a file called extended_log.jun.2001.
gzip extended_log.jun.2001Note: compressing the file with the gzip command automatically adds a .gz filename extension.
mv extended_log.jun.2001.gz ~
From time to time, our log splitting tool will stop working. While we usually catch these errors quickly, if you notice your log hasn't been updated for a few days, please let us know.