Eric - 2007-05-01

I went ahead and added 'extraquot' as one of the options for LogFormat. It's a pretty minor addition and probably just an oversight. This is a patch for awstats.pl revision 1.887.

awstats.pl.orig Fri Feb 2 10:10:57 2007
--- awstats.pl Wed Apr 25 19:15:40 2007
***
5247,5252 ***
--- 5247,5256 ----
$pos_extra[$1] = $i; $i++; push @fieldlib, "extra$1";
$PerlParsingFormat .= "([^$LogSeparatorWithoutStar]+)";
}
+ elsif ($f =~ /%extraquot(\d+)$/) {
+ $pos_extra[$1] = $i; $i++; push @fieldlib, "extra$1";
+ $PerlParsingFormat .= "\\"([^\\"]
)\\"";
+ }
# Other tag
elsif ($f =~ /%other$/) {
$PerlParsingFormat .= "[^$LogSeparatorWithoutStar]+";

I found this helpful because I wanted to log 'Accept-Language'. My apache log format looks like:

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Accept-Language}i\" (%{ratio}n) %V" combined

and the corresponding awstats:

LogFormat = "%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot %extraquot1 %deflateratio %extra2"

The quotation marks around the Accept-Language are necessary because some browsers insert whitespace between the acceptable languages.