Security warning: Please don't use any version older than 1.11!

The logging function of gzip_cnc

Writing messages

For each page request handled by gzip_cnc the program writes an entry into its own log file if one has been defined in its configuration.

At the end of each request processing gzip_cnc

The program does not try to synchronize between several simultaneous write accesses.

Log file format

Each log file entry consists of fields in the following format:

$date $status: $sizein -> $sizeout ($rate%) $cputime sec $url

where the individual fields have this meaning:

field name format explanation
$date YYYY-MM-DD_hh:mm:ss date and time of this log entry's creation
$status string status code of this request's processing
$sizein integer or "-" size of the original file (uncompressed) in bytes
$sizeout integer or "-" size of the cache file (compressed) in bytes
$rate float compression rate of the page content in percent
(or 0 if the cache file was not served)
$cputime float used CPU time during processing in seconds
$url string requested document URL

Log file evaluation

gzip_cnc supplies its own evaluation program gzip_cnc_log_eval for this log format. This program - just like gzip_cnc - is written in Perl.

Nevertheless it is not invoked as CGI script (due to a potentially rather long execution time during the evaluation of huge log files) but via command line:

perl gzip_cnc_log_eval $filein $fileout

These two (optional) parameter values describe the path names of

If only one parameter value is supplied then this value will used as input file name. For missing parameter values the default values preselected inside the program code are used; therefore the program can be placed into the same directory as the gzip_cnc log file and be executed without given parameter values.

Just like gzip_cnc you can modify the behaviour of gzip_cnc_log_eval by setting appropriate values at the start of the program's source code. The following attributes can be set:

Details about this are explained in depth inside the gzip_cnc_log_eval source code.

(Michael Schröpl, 2002-08-04)