Added tag %Wy-n for LogFile parameter (replaced with the week number in year but differs from %WY-n because start with 0).
- New parameter: Added URLWithQueryWithoutFollowingParameters to exclude some
parameters from URL when URLWithQuery is on.
- New parameter: Added URLReferrerWithquery.
+- Added tag %Wm-n for LogFile parameter (replaced with the week number in month
+ but differs from %WM-n because start with 0).
+- Added tag %Wy-n for LogFile parameter (replaced with the week number in year
+ but differs from %WY-n because start with 0).
- Added tag %Dw-n for LogFile parameter (replaced with the day number in week
but differs from %DW-n because start with 0).
- Fixed: Log analyze is no more stopped if log file contains binary chars.
4.0+ for tag %DW-n<br>\r
4.1+ for tag %NS-n<br>\r
5.0+ for tag %WY-n<br>\r
-5.1+ for tag %Dw-n<br>\r
+5.1+ for tag %Wm-n, %Wy-n, %Dw-n<br>\r
<br># "LogFile" contains the web server logfile to analyze.\r
<br># You can use a full path or relative path from awstats.pl directory.\r
<br># Example: "/var/log/apache/access.log"\r
<br># %HH-n is replaced with hour we were n hours ago\r
<br># %NS-n is replaced with number of seconds at 00:00 since 1970\r
<br># %WM-n is replaced with the week number in month (1-5)\r
+<br># %Wm-n is replaced with the week number in month (0-4)\r
<br># %WY-n is replaced with the week number in year (1-52)\r
+<br># %Wy-n is replaced with the week number in year (0-51)\r
<br># %DW-n is replaced with the day number in week (1-7, 1=sunday)\r
<br># use n=24 if you need (1-7, 1=monday)\r
<br># %Dw-n is replaced with the day number in week (0-6, 0=sunday)\r
<br># %gzipin Mod_gzip compression input bytes: In:XXX\r
<br># %gzipout Mod_gzip compression output bytes & ratio: Out:YYY:ZZZpct.\r
<br># %gzipratio Mod_gzip compression ratio: ZZZpct.\r
+<br># %email EMail sender (for mail log)\r
+<br># %email_r EMail receiver (for mail log)\r
<br># %syslog Syslog-specific time and host stamp with format: Mon dd hh:mm:ss hostname\r
<br># %virtualname Web sever virtual hostname. Use this tag when same log\r
<br># file contains data of several virtual web servers. The\r
<br># If your log format has some fields not included in this list, use\r
<br># %other Means another field\r
<br>#\r
-<br># Examples for Apache combined logs (this two examples are equivalent):\r
+<br># Examples for Apache combined logs (following two examples are equivalent):\r
<br># LogFormat = 1\r
<br># LogFormat = "%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"\r
-<br># Examples for IIS (this two examples are equivalent):\r
+<br>#\r
+<br># Examples for IIS (following two examples are equivalent):\r
<br># LogFormat = 2\r
<br># LogFormat = "%time2 %host %logname %method %url %code %bytesd %other %ua %referer"\r
<br>#\r
# %HH-n is replaced with hour we were n hours ago
# %NS-n is replaced with number of seconds at 00:00 since 1970
# %WM-n is replaced with the week number in month (1-5)
+# %Wm-n is replaced with the week number in month (0-4)
# %WY-n is replaced with the week number in year (1-52)
+# %Wy-n is replaced with the week number in year (0-51)
# %DW-n is replaced with the day number in week (1-7, 1=sunday)
# use n=24 if you need (1-7, 1=monday)
# %Dw-n is replaced with the day number in week (0-6, 0=sunday)
# If your log format has some fields not included in this list, use
# %other Means another field not used
#
-# Examples for Apache combined logs (this two examples are equivalent):
+# Examples for Apache combined logs (following two examples are equivalent):
# LogFormat = 1
# LogFormat = "%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot"
#
-# Examples for IIS (this two examples are equivalent):
+# Examples for IIS (following two examples are equivalent):
# LogFormat = 2
# LogFormat = "%time2 %host %logname %method %url %code %bytesd %other %ua %referer"
#
if ($timetag =~ /DD/i) { $LogFile =~ s/%DD-$timephase/$olderday/ig; next; }
if ($timetag =~ /HH/i) { $LogFile =~ s/%HH-$timephase/$olderhour/ig; next; }
if ($timetag =~ /NS/i) { $LogFile =~ s/%NS-$timephase/$olderns/ig; next; }
- if ($timetag =~ /WM/i) { $LogFile =~ s/%WM-$timephase/$olderweekofmonth/ig; next; }
- if ($timetag =~ /WY/i) { $LogFile =~ s/%WY-$timephase/$olderweekofyear/ig; next; }
+ if ($timetag =~ /WM/) { $LogFile =~ s/%WM-$timephase/$olderweekofmonth/g; next; }
+ if ($timetag =~ /Wm/) { my $olderweekofmonth0=$olderweekofmonth-1; $LogFile =~ s/%Wm-$timephase/$olderweekofmonth0/g; next; }
+ if ($timetag =~ /WY/) { $LogFile =~ s/%WY-$timephase/$olderweekofyear/g; next; }
+ if ($timetag =~ /Wy/) { my $olderweekofyear0=$olderweekofyear-1; $LogFile =~ s/%Wy-$timephase/$olderweekofyear0/g; next; }
if ($timetag =~ /DW/) { $LogFile =~ s/%DW-$timephase/$olderwday/g; next; }
if ($timetag =~ /Dw/) { my $olderwday0=$olderwday-1; $LogFile =~ s/%Dw-$timephase/$olderwday0/g; next; }
# If unknown tag
$LogFile =~ s/%DD/$nowday/ig;
$LogFile =~ s/%HH/$nowhour/ig;
$LogFile =~ s/%NS/$nowns/ig;
- $LogFile =~ s/%WM/$nowweekofmonth/ig;
- $LogFile =~ s/%WY/$nowweekofyear/ig;
+ $LogFile =~ s/%WM/$nowweekofmonth/g;
+ my $nowweekofmonth0=$nowweekofmonth-1; $LogFile =~ s/%Wm/$nowweekofmonth0/g;
+ $LogFile =~ s/%WY/$nowweekofyear/g;
+ my $nowweekofyear0=$nowweekofyear-1; $LogFile =~ s/%Wy/$nowweekofyear0/g;
$LogFile =~ s/%DW/$nowwday/g;
my $nowwday0=$nowwday-1; $LogFile =~ s/%Dw/$nowwday0/g;
$LogFormat =~ s/\\//g;