]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Added tag %Wm-n for LogFile parameter (replaced with the week number in month but...
authoreldy <>
Tue, 22 Oct 2002 11:18:39 +0000 (11:18 +0000)
committereldy <>
Tue, 22 Oct 2002 11:18:39 +0000 (11:18 +0000)
Added tag %Wy-n for LogFile parameter (replaced with the week number in year but differs from %WY-n because start with 0).

docs/awstats.pdf
docs/awstats_changelog.txt
docs/awstats_config.html
wwwroot/cgi-bin/awstats.model.conf
wwwroot/cgi-bin/awstats.pl

index 336c71437ee6152fc3a1ae0ed6d9c61e5868522c..0a0a7fe428c8bf6abe7cf4cbbced2e5a750650e0 100644 (file)
Binary files a/docs/awstats.pdf and b/docs/awstats.pdf differ
index 6f0bf6775997800bfd9b83d3c3f84c016ee63228..fdc0ba3f4c78372f0cceea3aa59edc30910c8570 100644 (file)
@@ -18,6 +18,10 @@ AWStats Changelog
 - 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.
index ffa7b6ae3aaf8969bed2ecc4fa04f1385a9e4b18..ee7f5de60c780cf45c7ad7a71a9c4e1ba74447ec 100644 (file)
@@ -197,7 +197,7 @@ when reading it), follow the example:<br>
 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
@@ -212,7 +212,9 @@ when reading it), follow the example:<br>
 <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
@@ -266,6 +268,8 @@ when reading it), follow the example:<br>
 <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
@@ -273,10 +277,11 @@ when reading it), follow the example:<br>
 <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
index 3c324c22c1a5af1ba533bfcef6832b54cb8c125a..9e4857eae4a90325317a19b2688a439fb5f14e01 100644 (file)
@@ -30,7 +30,9 @@
 #   %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)
@@ -85,11 +87,11 @@ LogFile="/var/log/apache/access.log"
 #   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"
 #
index ab4b153b32aff6869dfca26fe145f7f71a833e77..8ebec036d114bf1b375119e32a3083cc189c3ac0 100644 (file)
@@ -1423,8 +1423,10 @@ sub Check_Config {
                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
@@ -1437,8 +1439,10 @@ sub Check_Config {
        $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;