How to use the Log Validator
This section talks about the "technical" aspects of using the Log Validator. A process-oriented tutorial is also available.
What is in the LogValidator Package
The Log Validator is a package containing a Library (the Log Validator per se) and a program to act as an interface for this library. This program is logprocess and we will review and explain its use in this part of the Log Validator manual.
Along with this program comes a (sample) configuration file.
Where is the program?
The program (script) is named logprocess.pl
- If you have installed Log Validator with CPAN, it should certainly be located at /usr/local/bin/logprocess.pl
- If you have installed Log Validator with CPAN, you may also find it at ~/.cpan/build/W3C-LogValidator-[XXXX]/bin/logprocess.pl (Where [XXXX] is the version number you have installed)
- If you have installed the Log Validator by hand, you may find the program in the bin/ directory (in the uncompressed archive).
- If you can't find it, you can try to run whereis logprocess.pl from the shell commandline.
- Grab the latest version from our repository here if you still cannot find it in the package.
Where is the (sample) configuration file?
The sample configuration file is named logprocess.conf
- If you have installed the Log Validator by hand (standard archive), you may find it in the samples/ directory (in the uncompressed archive).
- If you have installed Log Validator with CPAN, you may find it at ~/.cpan/build/W3C-LogValidator-[XXXX]/samples/logprocess.conf
- Grab the latest version from our repository here if you still cannot find it in the package.
Setup / Configuration
You may either copy the sample configuration file to the location of your choice and edit it with a text editor, or simply edit the sample file directly.
The sample configuration file is commented with notes and pointers to help you understand the syntax of this file (which, as you may notice, is very similar to the syntax of apache web server's). When in doubt, you should probably leave the default values, or look at the configuration of your web server (especially if you are using the apache server).
Running logprocess
learn about the options
Learn the options with:
shell# logprocess.pl -h
You may have to make the script executable if the installation script didn't
(if you get an error message when trying to run the program for the first time,
that may be the reason...):
shell# chmod a+x logprocess.pl
first run, using your custom configuration file
Now, simply run the script with your favorite options:
shell# logprocess.pl -f path/to/file.conf [options]
Note that you may use logprocess without mentioning a configuration file. logprocess will then try to work with the default parameters hard-coded in the program, such as:
- looking for log files in /var/log/apache/
- parsing the log file as "common log format"
- by default, use the HTMLValidator module
This default behaviour may work with "very standard" systems, but we strongly recommend you use your own configuration file.
Learning more
Once you are familiar with logprocess, proceed to read the Tips which will help you use the Log Validator and logprocess even better.