Processing Apache Log Files with "Analog"

This section provides a tutorial example on how to process Apache log files with 'Analog'.

1. Downloading my log files to run with "analog".

herong> cd \local\logs
herong> ftp mydomain.com
   (download access.log.44.gz)

herong> \local\winrar x access.log.44.gz *.* .

herong> edit c:\local\analog\analog.cfg
   LOGFILE c:\local\logs\access.log.*

herong> \local\analog\analog
analog: analog version 6.0/Win32
analog: Warning E: Redirecting future diagnostic messages to errors.txt
  (For help on all errors and warnings, see docs/errors.html)

herong> type \local\analog\errors.txt
analog: Warning F: Can't auto-detect format of 
   logfile access.log.44: ignoring it
...

So "analog" with default settings can not read my log file format. Note that "winrar" is a shareware uncompress .gz files.

2. Configuring "analog" for my log format:

herong> cd \local\logs
herong> type access.log.44 | more
192.168.72.177 - - [22/Dec/2002:23:32:14 -0400] "GET 
   /news/sports.html HTTP/1.1" 200 3500 www.yahoo.com 
   "http://www.some.com/" "Mozilla/4.0 (compatible; MSIE ...)" "-"
...

herong> edit c:\local\analog\analog.cfg
   LOGFORMAT (%s - - [%d/%M/%Y:%h:%n:%t -%j] "%j %r %j" %c %b %v "%f"
      "%B" "%j")

herong> \local\analog\analog
   (no errors)   

Here I used the following formatting codes for the LOGFORMAT setting:

%s - Numerical IP address of client
%d/%M/%Y:%h:%n:%t - Date and time fields
%j - Junk field. Skip it. 
%r - File requested 
%c - HTTP response status code 
%b - Number of bytes transferred 
%v - Virtual host, the server hostname
%f - Referrer URL
%B - Browser information

3. Adding referrer report:

herong> edit c:\local\analog\analog.cfg
   REFERRER ON
   REFFLOOR 0r       

herong> \local\analog\analog
   (no errors)   

The above settings tell "analog" to generate a referrer section in the report. I have also lowered the lower limit (floor) to show referrers with lower request counts.

4. Running the "analog" command again.

herong> \local\analog\analog
analog: analog version 6.0/Win32

It runs correctly and regenerated a nice report at \local\logs\report.html.

Table of Contents

 About This Book

 Website Statistics and Trends

 Year 2025 Reports

 Year 2024 Reports

 Year 2023 Reports

 Year 2022 Reports

 Year 2021 Reports

 Year 2020 Reports

 Year 2019 Reports

 Year 2018 Reports

 Year 2017 Reports

 Year 2016 Reports

 Year 2015 Reports

 Year 2014 Reports

 Year 2013 Reports

 Year 2012 Reports

 Year 2011 Reports

 Year 2010 Reports

 Year 2009 Reports

 Year 2008 Reports - Part II

 Year 2008 Reports - Part I

 Year 2007 Reports

 Year 2006 Reports

 Year 2005 Reports

Analog - Web Server Log Files and Analysis Tool

 Web Server Log File Samples - IIS and Apache

 Analog 6.0/Win32 - Web Log File Analysis Tool

 Configuring "Analog" to Process Log Files

Processing Apache Log Files with "Analog"

 Analog CE 6.17 on Mac Computer

 Analog CE 6.18 on Mac Computer

 References

 Full Version in PDF/ePUB